home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!microsoft!hexnut!ericsc
- From: ericsc@microsoft.com (Eric Schlegel)
- Subject: Re: Radio buttons
- Message-ID: <1992Jul29.195807.15996@microsoft.com>
- Date: 29 Jul 92 19:58:07 GMT
- Organization: Microsoft Corporation
- References: <1992Jul26.195145.1@acad3.alaska.edu>
- Lines: 36
-
- In article <1992Jul26.195145.1@acad3.alaska.edu> fsmah1@acad3.alaska.edu (Mike Hageland) writes:
- >I have a very simple little problem with what seems to be a complicated
- >solution. Look at this diagram and pretend the X represents where I
- >want a radio button.
- >
- > X Title | Title X
- > X Title | Title X
- > X Title | Title X
- >
- >Personally I think this looks kinda neat. I would like to do something
- >like this. Now this is no problem, I can simply draw the titles in and
- >then place in the radio buttons. However, then you can't simply click
- >onto the title like you can with most radio buttons. It seems that the
- >radio button will only put the title to the right of the radio button.
- >
- >Is there a hidden way to make a radio button have a title on the left?
-
- You need to set the system justification to teFlushRight (-1) before
- drawing the right-hand column of radio buttons. You can do this with the
- Script Manager trap _SetSysJust:
- SetSysJust(teFlushRight);
- Don't forget to save the previous justification using _GetSysJust before
- changing it, and restore it afterwards.
-
- If you're doing this in a window of your own creation, you can just
- call _SetSysJust and then _Draw1Control to draw the right-hand radio buttons.
- If your radio buttons are in a Dialog Manager dialog you may need to use
- a filter proc that catches update events and does the updating itself,
- using _SetSysJust and _Draw1Control as needed, instead of letting the Dialog
- Manager draw the controls.
-
- For more information, see Inside Mac vol. 5, pg. 301, "Writing Direction."
-
- -eric
- -------
- My opinions, not Microsoft's.
-