Re: Delete Key
- From: Ron Benditt <rbenditt@xxxxxxxxxxxxxxxxxx>
- To: ftcdev@xxxxxxxxxxxxx
- Date: Mon, 24 Mar 2008 13:06:07 -0400
On Mar 24, 2008, at 12:56 PM, Brendan Murphy wrote:
Ron Benditt wrote:
But... I have found what is causing it. Among other things, I'm
calling self.refresh(false) in the TextChanged event. Oddly, the
flicker does not happen during normal typing... only when there is
text selected and you hit a key, delete or otherwise, to replace
the selection.
You want to call "update" to request an update to the display. If
you want an immediate update at that specific moment, call
"update(true, true)". For efficiency sake it is better to call
"update" and wait for the internal timer to fire off (every 0.333
seconds). So you have to decide what behavior is appropriate for
your situation.
I should probably override the refresh method so that it
translates correctly into the update mechanism.
Ok, but I'm actually calling Self.refresh (as opposed to me.refresh).
My intention is to update the entire window. In the TextChanged
event, I update all of the controls on the window to depict the state
of the currently selected text. On Windows XP and Vista, I get a lot
of flicker when I do this, so I lock the window with Aaron Ballman's
window.FreezeUpdate function, do the changes, then call
window.UnfreezeUpdate. After I unfreeze things, I need to call a
refresh to repaint everything. This is where the odd flicker happens
with FTC. Of course, on a Mac, all of this is not needed, but it
still flickers as described if the refresh call is included.
Regards,
Ron Benditt
Alien Apparatus Company, Inc.
http://www.alienapparatus.com
FTC Website: www.truenorthsoftware.com/Realbasic/FormattedText.html
Set List Options (digest and vacation modes): www.freelists.org/list/ftcdev
List Archive: www.freelists.org/archives/ftcdev
Unsubscribe: Send email to ftcdev-request@xxxxxxxxxxxxx with "unsubscribe" in
the subject field.
- References:
- Delete Key
- From: Ron Benditt
- Re: Delete Key
- From: Brendan Murphy
- Re: Delete Key
- From: Ron Benditt
- Re: Delete Key
- From: Brendan Murphy
Other related posts:
- » Delete Key
- » Re: Delete Key
- » Re: Delete Key
- » Re: Delete Key
- » Re: Delete Key
- » Re: Delete Key
Ron Benditt wrote:
But... I have found what is causing it. Among other things, I'm calling self.refresh(false) in the TextChanged event. Oddly, the flicker does not happen during normal typing... only when there is text selected and you hit a key, delete or otherwise, to replace the selection.
You want to call "update" to request an update to the display. If you want an immediate update at that specific moment, call "update(true, true)". For efficiency sake it is better to call "update" and wait for the internal timer to fire off (every 0.333 seconds). So you have to decide what behavior is appropriate for your situation. I should probably override the refresh method so that it translates correctly into the update mechanism.
- Delete Key
- From: Ron Benditt
- Re: Delete Key
- From: Brendan Murphy
- Re: Delete Key
- From: Ron Benditt
- Re: Delete Key
- From: Brendan Murphy