Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!amcad!stech!sysop From: sysop@stech.UUCP (Jan Harrington) Newsgroups: comp.sys.mac Subject: Re: Hypercard again (radio button) Message-ID: <166@stech.UUCP> Date: Thu, 8-Oct-87 08:39:32 EDT Article-I.D.: stech.166 Posted: Thu Oct 8 08:39:32 1987 Date-Received: Sun, 11-Oct-87 01:30:16 EDT References: <30200@sun.uucp> Organization: Scholastech, Inc., Waltham, Mass. Lines: 35 in article <30200@sun.uucp>, chuq%plaid@Sun.COM (Chuq Von Rospach) says: > > I know what I need to do to handle a set of radio buttons properly. What I > don't know, and can't find any documentation on, is (1) how to query the > state of a radio button ("hi, are you checked?") and how to alter it ("hey, > turn yourself on!"). Anyone know the magic incantation? > How you handle the highlighting depends on whether you've checked Auto hilight when you defined the button. If Auto hilight is checked (in that dialog box you get for buttons), then Hypercard will take care of turning the button on and off. You can check the button's state with something like: if autoHilite of button ID XX is true then ..... Replace the XX, of course, with the right button ID or ID XX with the button's name if the script is attached to something other than the button itself. If the script is attached to the button itself, then you don't need the button identifier. If Auto hilight isn't selected, then you must attach a script to each button which detects mouseup events, checks the current hilite state, and then sets the button accordingly: if hilite is true then set hilite false else set hilite true ..... In most cases, using Auto hilite is certainly easier! Jan Harrington, sysop Scholastech Telecommunications ihnp4!husc6!amcad!stech!sysop