Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > NSTableViews and popup menus

NSTableViews and popup menus
Thread Tools
Forum Regular
Join Date: Jan 2001
Location: Boston, MA
Status: Offline
Reply With Quote
Jul 25, 2002, 11:19 AM
 
I'd appreciate any insight/advise/code for the following task. I'm creating an NSTableView with two columns: one to hold an NSString, the other I'd like to hold an NSPopUpButton (a popup menu) which is to be pre-populated and will be the same for every row in the table.

However, I'm unclear as how to proceed. Do I create a new NSPopUpButtenCell, populate it and then call [aTableColumn setDataCell] with the newly created NSPopUpButtonCell? Or do I just return a new NSPopUpButton in my appropriate NSTableDataSource methods?

In an NSBrowser you can set a prototype cell, so I was hoping for similar functionality in NSTableView -- it may be there but I'm just missing it!

Any help would be greatly appreciated!
     
SoClose  (op)
Forum Regular
Join Date: Jan 2001
Location: Boston, MA
Status: Offline
Reply With Quote
Jul 25, 2002, 11:52 AM
 
Nevermind, I answered my own problem. I ended up created an NSPopUpButtonCell and then when the table asks for a row item, I just return a dummy string and my popup button is correctly drawn.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 12:35 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2