Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!samsung!uunet!microsoft!t-alexc From: t-alexc@microsoft.UUCP (Alex CHAFFEE) Newsgroups: comp.sys.mac.programmer Subject: Re: dialogs with ModalDialog() Summary: Use TextBox( ..., teJustRight ) Message-ID: <56257@microsoft.UUCP> Date: 2 Aug 90 03:23:07 GMT References: <37353@shemp.CS.UCLA.EDU> Reply-To: t-alexc@microsoft.UUCP (Alex CHAFFEE) Distribution: usa Organization: Microsoft Corp., Redmond WA Lines: 27 In article <37353@shemp.CS.UCLA.EDU> trajmar@oahu.cs.ucla.edu (Peter Trajmar) writes: > >2) Is there a good way to right align the text in an editText item? The problem with this is for inputting - how do you right align text as it's being typed and make it look nice? What I'd do is keep it a normal editText item while it's the active item, but as soon as the user tabs/clicks away from it, redraw its text using GetDItem ( theDialog, itemNo, &itemType, &itemHandle, &itemRect ); GetIText ( itemHandle, st ); TextBox( st+1, *st, &itemRect, teJustRight ); Of course, you'd have to do this again for update events. To be really slick, you could save the text in a global and change it to a userItem whose draw procedure TextBox()s that saved text. Then when it's selected again, change it back. Disclaimer: I just made that up, so it's probably wrong. >Peter Trajmar >(trajmar@cs.ucla.edu) - Alex Chaffee ...!microsoft!t-alexc (->Aug.10) chaffee@reed.bitnet (Aug.10->)