News : The level of daily SPAM has reached insane proportions, all registrations are now manual. I ask you to send me an e-mail (john (at) murga (dot) org), to confirm that you want me to create an account for you.


Post Reply  Post Thread 
Different redraw behaviors with different box types
Author Message
widged
Junior Member
**


Posts: 35
Group: Registered
Joined: May 2007
Status: Offline
Reputation: 0
Post: #1
RE: Different redraw behaviors with different box types

mikshaw Wrote:
I assume the clock is a unique situation, and you wouldn't need to force redraw on most interactive widgets?


Anytime you use a "NO_BOX" or "FRAME" type (boxes with no background), the window:redraw() doesn't flush the previous tracing (I had had the same problem with the bezier animation).

With widgets other than the clock, a redraw is needed only when the widget has been changed. This can be detected via:

Code:
widget:when(1); -- 1 : something changed
widget:callback(function()
out:value("changed")
end)


or better, triggered by any code that does some drawing.

-- Typed from memory, not guaranteed to work as described. Second thought, when is related to on screen events like mouseclick which cause the state of the object to change (checkbox checked, etc.)... best is to trigger a window refresh in the code that causes the screen content to change --

This post was last modified: 06-06-2007 03:27 AM by widged.

06-06-2007 03:22 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

Messages In This Thread
RE: Different redraw behaviors with different box types - widged - 06-06-2007 03:22 AM

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: