ftp.nice.ch/peanuts/GeneralData/Usenet/news/1989/CSN-89.tar.gz#/comp-sys-next/1989/Aug/About-popUpLists

This is About-popUpLists in view mode; [Up]


Date: Sun 24-Aug-1989 21:50:15 From: Unknown Subject: About popUpLists About popUpLists I have some trouble using removeItem: and removeItemAt: when that item is displayed on the button. I would also like to select items from the program itself like: SelectItemAt:(int)index Performs in the same way as if the item was selected with mouse by the user. Any codeexample in the intended direction would be appreciated. Thanks >From: jpd00964@uxa.cso.uiuc.edu
Date: Sun 26-Aug-1989 01:31:00 From: Unknown Subject: Re: About popUpLists /* Written 4:50 pm Aug 24, 1989 by wab@sumex-aim.stanford.edu in uxa.cso.uiuc.edu:comp.sys.next */ /* ---------- "About popUpLists" ---------- */ >About popUpLists > >I have some trouble using removeItem: and removeItemAt: when that item >is displayed on the button. Are you also changing the title of the button? If you don't, you'll only reinsert the item into the popupList when the button is selected >Question: How can you remove an item that is selected? Can you elaborate. What do you mean remove? What does the button say when you "remove" it? Selecting an item usually means to set a value, not remove it. > >I would also like to select items from the program itself like: > > SelectItemAt:(int)index > Performs in the same way as if the item was selected with mouse by the >user. > You do this by setting the title to the text you want selected. So if item 3 has the text "normal", you would get the text for item 3 and set the title of the button to normal. One pitfall to watch for, if you set the title to something out of your list, you will get an addition to your list at the top. Michael Rutman Softmed >From: pvo3366@neptune.uucp (Paul O'Neill)

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Marcel Waldvogel and Netfuture.ch.