home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!gatech!concert!borg!strauss!lari
- From: lari@strauss.cs.unc.edu (Humayun Lari)
- Newsgroups: comp.sys.mac.programmer
- Subject: Re: How do I STOP my TextEdit field from updating?
- Message-ID: <18336@borg.cs.unc.edu>
- Date: 14 Dec 92 02:56:35 GMT
- References: <1992Dec13.182630.4371@netcom.com>
- Sender: news@cs.unc.edu
- Organization: The University of North Carolina at Chapel Hill
- Lines: 17
-
- In article <1992Dec13.182630.4371@netcom.com> bskendig@netcom.com (Brian Kendig) writes:
- >How can I STOP the TextEdit field from redrawing itself immediately
- >when I delete a line? I TEDeactivate it, and turn off TEAutoView. I
- >will eventually get around to updating the window on the screen, at
- >which time I want the text to be redrawn -- but not now!
-
- One way to solve the problem would be to access the text directly through the
- hText field, using BlockMove and SetHandleSize to delete the line and then
- calling TECalText to update the lineStarts array. TECalText will probably be
- kind of slow, though; if you don't mind being sneaky, you can decrement nLines
- and use BlockMove and SetHandleSize to shift the lineStarts array up one, in
- the same way you deleted the line.
-
- <Grin> This is guaranteed to work -- theoretically, of course.
-
- Humayun Lari
- (lari@cs.unc.edu)
-