Suppressing drawing
Suppressing drawing
- Subject: Suppressing drawing
- From: Mike Kobb <email@hidden>
- Date: Sat, 15 Dec 2007 17:47:22 -0800
Hello,
I'm fairly new to Cocoa programming, and I'm having a little drawing
problem that I'm sure is simple to solve if somebody would be kind
enough to point me in the right direction.
Here's my problem. I have an NSTextView with some text in it. When a
particular event happens, I need to change the text in the view, and
also resize the view (I'm moving the left edge of the view over a bit
to make room for a "caution" icon that only appears when the app
encounters a problem.
So, the first thing that I do is to set the frame and bounds of the
view (setView and setBounds), and then I call
replaceCharactersInRange:withAttributedString: to replace the text. I
do these two things one right after the other in one function.
Sometimes, I get a brief flicker as the view re-draws in its new size,
before the new text renders.
What I'd like to do is to suppress the re-draw of the view until both
the resize and the text set have completed.
I'd appreciate any pointers to the proper way to do this. I've tried
searching both the docs and the list, but I must be looking for the
wrong terminology.
Thanks!
--Mike
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden