home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / mac / programm / 20892 < prev    next >
Encoding:
Internet Message Format  |  1993-01-07  |  1.9 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!wupost!spool.mu.edu!enterpoop.mit.edu!eru.mt.luth.se!lunic!sunic!corax.udac.uu.se!tdb!bredell
  2. From: bredell@tdb.uu.se (Mats Bredell)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Re: Default buttons in dialogs
  5. Message-ID: <1993Jan7.153419.3711@tdb.uu.se>
  6. Date: 7 Jan 93 15:34:19 GMT
  7. References: <1993Jan7.022657.24159@reed.edu>
  8. Reply-To: Mats.Bredell@udac.uu.se
  9. Organization: Uppsala University Computing Center (UDAC)
  10. Lines: 33
  11. X-Newsreader: TIN [version 1.1 PL6]
  12.  
  13. BoBolicious (bowman@reed.edu) wrote:
  14. : In article <880840m.29.726366713@axe.acadiau.ca> 880840m@axe.acadiau.ca (MICHAEL ALEXANDER MCKAY) writes:
  15. : >Whenever I make a dialog box with ResEdit, my "OK" buttons, which are always
  16. : >the number 1 button, fail to show up in my app with the heavy outline around 
  17. : >them. What am I doing wrong?
  18. : Sounds like you're not drawing the heavy outline. ;-)
  19. : Seriously, there's nothing I've seen anywhere that would indicate this
  20. : happens automatically...whatever gave you that idea?
  21. : Anyhow...
  22. : There are several ways to do it.  One is to make a userItem whose sole purpose
  23. : in life is to draw the outline whenever the dialog is updated.  Or you can
  24. : do the simple-but-not-quite-as-kosher thing, right before you call ModalDialog:
  25. : GetDItem(theDialog,1,&DType,&DItem,&itsFrame);
  26. : InsetRect(&itsFrame,-4,-4);
  27. : PenSize(3,3);
  28. : FrameRoundRect(&itsFrame,16,16);
  29. : PenSize(1,1);
  30. : ...or something like that.  I think the 16's are "standard".
  31.  
  32. There's a toolbox call that draws the outline for the default button. I can't
  33. remember the name, but it's in a tech note (works for system 7 only).
  34.  
  35. /Mats
  36. -- 
  37. Mats Bredell                                   Mats.Bredell@udac.uu.se
  38. Uppsala University Computing Center (UDAC)     Ph:  +46 18 187817
  39. Department of medical systems                  Fax: +46 18 187825
  40. Sweden                                         Think straight - be gay!
  41.