|Jun 8, 2011, 09:25 PM||#1|
[NSPopUpButton] "titleOfSelectedItem" ??
Hi to All,
As some of you are aware, I am in my very early stages of developping for Mac after leaving Windows to take up with Mac. I still have a lot to learn and enjoying the new skills.
My question is. If I have created an object of NSPopUpButton and called it myPopUp (in this example).
In it's simplessed form, would I return the string of the selected item like this:
NSString *returnedValue = [myPopUp titleOfSelectedItem];
|Jun 8, 2011, 09:49 PM||#2|
Well, probably the more standard way to do it is to create a Pop Up button by dragging it to your window in Interface Builder. Then create an outlet to the button in whatever controller you want.
Then yes, you should be able to call:
NSString *sel = [mybutton titleOfSelectedItem];
NSInteger sel = [mybutton indexOfSelectedItem];
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|Save "gray scale" and "max contrast" via Universal Access in screen captures||NeonKingKong||OS X||2||Jun 2, 2013 09:09 PM|
|2010 27" iMac screen issue..."dirty", "cloudy", image retention issues||MMcCraryNJ||iMac||1||May 18, 2013 04:02 PM|
|My Logic "track expander tube" doesn't have "end tips" to grab! Whats up?||kristenanne77||Digital Audio||3||Mar 28, 2013 08:15 AM|
|Resolved: Weird problem with keyboard mapping : LMP Bluetooth Keypad's "enter" seen as "CMD"||DanRom||iMac||2||Aug 24, 2012 12:27 AM|
|Start a new tab similar to "iOS blog" and "Mac blog" but make it "IPhone Leaks?"||Dewroo||Site and Forum Feedback||2||Aug 23, 2012 09:47 AM|
All times are GMT -5. The time now is 03:24 AM.