Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!rice!husc6!unix!mxmora From: mxmora@unix.SRI.COM (Matt Mora) Newsgroups: comp.sys.mac.programmer Subject: Re: Setting Fonts in Dialogs Message-ID: <10848@unix.SRI.COM> Date: 9 Apr 90 18:18:30 GMT References: <1739@cybaswan.UUCP> <1990Apr9.045703.6950@intercon.com> Reply-To: mxmora@unix.UUCP (Matt Mora) Organization: SRI International, Menlo Park, CA Lines: 43 In article <1990Apr9.045703.6950@intercon.com> amanda@mermaid.intercon.com (Amanda Walker) writes: >In article <1739@cybaswan.UUCP>, csparr@cybaswan.UUCP (Jason Parr) writes: >> Is it possible to change the font in a dialog, if so how do you do it? > >The easiest way to change the font of a particular item is to make it >a user item and maintain your own TEHandle for it. If it's the only >editText item in the dialog, it's pretty easy, but if you have other >fields that are handled by the Dialog Manager, you have to go through some >hoops to avoid getting two blinking insertion points... > >It's too bad ictb's don't work on the Plus or SE... > >-- >Amanda Walker, InterCon Systems Corporation >-- Am I missing something? SetDAFont(fontNum); Inside Mac Page 412. Won't this call set the font for you? I've done his before and it worked. Now if you want to change the font and the size then it get a little trickier. Below is some code from a fkey that I wrote: setdafont(1); mydlg := GetNewDialog(128, nil, pointer(-1)); {bunch o' error checking. deleted for clarity} dpeek := DialogPeek(mydlg); dpeek^.textH^^.txsize := 9; This works for me. If you want only one thing in a dialog to be a certain font then you have to go the Dialog filter route. -- ___________________________________________________________ Matthew Mora SRI International mxmora@unix.sri.com ___________________________________________________________