Article View: comp.sys.next.programmer
Article #1942Re: Problems using PopUpLists
From: William Lewis
Date: Wed, 23 Dec 1992 00:15
Date: Wed, 23 Dec 1992 00:15
22 lines
1827 bytes
1827 bytes
gpal@poseidon (Greg Pal) writes:
>I've been having some problems using PopUpLists. I have two lists of 4
>items each (the first item in each list can be thought as the default
>value). I want to have button that will reset my lists to their default
>values. For example, if the last item of a list were selected, when I
>pressed this button, the default value would be selected and would be the
>title of the list. I thought that this would be a simple problem to solve
>but I can't find an easy way to do it.
When it's not actually popped up, a PopUpList stores its "current selection"
in the title of the button that does the popping-up. When theuser presses
that button, the button causes the popuplist to pop up; the popuplist
queries the button's title, and searches for this title in its array of
cells to determine which one to highlight. (If it's not there, it adds
it --- see the popuplist docs.) To change the current selection, you can
just use setTitle: on the button.
--
email: wiml@u.washington.edu | Home: Seattle, Washington |
(William Lewis) | 47 41' 15" N 122 42' 58" W |
NeXTmail: wiml@ingalls.cs.washington.edu `-------------------------------'
--*-- Member, Coalition to Preserve Semantic Vacuity --*--
Technical Details
Message-ID:
<wiml.725069706@milton>Path:
arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!rpi!batcomputer!cornell!uw-beaver!news.u.washington.edu!milton!wimlReferences:
<1992Dec22.154754.14860@almserv.uucp>Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!rpi!batcomputer!cornell!uw-beaver!news.u.washington.edu!milton!wiml From: wiml@milton.u.washington.edu (William Lewis) Subject: Re: Problems using PopUpLists Message-ID: <wiml.725069706@milton> Keywords: popuplist PopUpList Sender: news@u.washington.edu (USENET News System) Organization: University of Washington References: <1992Dec22.154754.14860@almserv.uucp> Date: Wed, 23 Dec 1992 00:15:06 GMT Lines: 22