Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!apple!well!svc From: svc@well.UUCP (Leonard Rosenthol) Newsgroups: comp.sys.mac.programmer Subject: Re: How does one set a single edittext item's font in a dialog? Message-ID: <14748@well.UUCP> Date: 28 Nov 89 19:31:41 GMT References: <21431@ut-emx.UUCP> <1569@intercon.com> Reply-To: svc@well.UUCP (Leonard Rosenthol) Organization: Whole Earth 'Lectronic Link, Sausalito, CA Lines: 31 In article <1569@intercon.com> amanda@intercon.com (Amanda Walker) writes: >In article <21431@ut-emx.UUCP>, rdd@walt.cc.utexas.edu (Robert Dorsett) writes: >> I have >> several edittext items in a modeless dialog. I want one of them to be in >> monaco 9, the rest in Chicago 12. > >The simplest way to get the effect you want would probably be to take the >item that's supposed to be monaco 9, make it a UserItem, and handle clicks >and keystrokes in it yourself with a dialog filter procedure. This way you >can maintain your own TextEdit record for that particular item, and thus >have full control over the font, size, etc. > >Handling the tab key and the insertion point could be hairy, though... > I would say that Amanda's method would probably be the best, but there is one other way and that is to use ictb resources. The ictb resource was designed so that you could color dialog items, as well as setting the font/size etc. for edit and statText fields in a dialog. The biggest problems with using ictb's are 1) the structure is a bitch to use and you have to hand do the hex since there is not editor or TMPL for ResEdit and 2) Apple doesn't guarentee it to work (don't you just love it!). I tried using it once and it was not to cooperative, but then I was trying it in a modeless dialog, and it will probably work better for modal dialogs. Just another thought on the subject... -- +--------------------------------------------------+ Leonard Rosenthol | GEnie : MACgician Lazerware, inc. | MacNet: MACgician UUCP: svc@well.UUCP | ALink : D0025