home *** CD-ROM | disk | FTP | other *** search
- 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
- From: bredell@tdb.uu.se (Mats Bredell)
- Newsgroups: comp.sys.mac.programmer
- Subject: Re: Default buttons in dialogs
- Message-ID: <1993Jan7.153419.3711@tdb.uu.se>
- Date: 7 Jan 93 15:34:19 GMT
- References: <1993Jan7.022657.24159@reed.edu>
- Reply-To: Mats.Bredell@udac.uu.se
- Organization: Uppsala University Computing Center (UDAC)
- Lines: 33
- X-Newsreader: TIN [version 1.1 PL6]
-
- BoBolicious (bowman@reed.edu) wrote:
- : In article <880840m.29.726366713@axe.acadiau.ca> 880840m@axe.acadiau.ca (MICHAEL ALEXANDER MCKAY) writes:
- : >Whenever I make a dialog box with ResEdit, my "OK" buttons, which are always
- : >the number 1 button, fail to show up in my app with the heavy outline around
- : >them. What am I doing wrong?
- :
- : Sounds like you're not drawing the heavy outline. ;-)
- : Seriously, there's nothing I've seen anywhere that would indicate this
- : happens automatically...whatever gave you that idea?
- :
- : Anyhow...
- :
- : There are several ways to do it. One is to make a userItem whose sole purpose
- : in life is to draw the outline whenever the dialog is updated. Or you can
- : do the simple-but-not-quite-as-kosher thing, right before you call ModalDialog:
- :
- : GetDItem(theDialog,1,&DType,&DItem,&itsFrame);
- : InsetRect(&itsFrame,-4,-4);
- : PenSize(3,3);
- : FrameRoundRect(&itsFrame,16,16);
- : PenSize(1,1);
- :
- : ...or something like that. I think the 16's are "standard".
-
- There's a toolbox call that draws the outline for the default button. I can't
- remember the name, but it's in a tech note (works for system 7 only).
-
- /Mats
- --
- Mats Bredell Mats.Bredell@udac.uu.se
- Uppsala University Computing Center (UDAC) Ph: +46 18 187817
- Department of medical systems Fax: +46 18 187825
- Sweden Think straight - be gay!
-