home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / mac / programm / 13185 < prev    next >
Encoding:
Text File  |  1992-07-29  |  1.9 KB  |  47 lines

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