Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!purdue!bu.edu!mirror!rayssd!jarsun1!drd!d.cs.okstate.edu!minich From: minich@d.cs.okstate.edu (Robert Minich) Newsgroups: comp.sys.mac.programmer Subject: Re: dialogs with ModalDialog() Message-ID: <1990Aug2.175108.9778@d.cs.okstate.edu> Date: 2 Aug 90 17:51:08 GMT References: <56257@microsoft.UUCP> Distribution: usa Organization: Oklahoma State University Lines: 31 > 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. This is completely speculation, but how about handling the text yourself in an offscreen bitmap and just CopyBits() to the screen after every character/delete? It may be more work than it's worth, but I think it wouldn't be as disturbing as watching something flop back and forth as you tab through the items. | Disclaimer: I just made that up, so it's probably wrong. Same here. :-) -- |_ /| | Robert Minich | |\'o.O' | Oklahoma State University| There are no heroes -- |=(___)= | minich@a.cs.okstate.edu | We all wear gray hats. | U | - Ackphtth |