Re: re drawing question

Phil <[email protected]>
Newsgroups gmane.comp.python.wxpython
Message-ID <[email protected]>
On 1/11/20 4:50 pm, Tim Roberts wrote:
> What’s the point of one-time-only drawing? If your app gets covered by 
> another application or a menu or a system dialog, how do you think 
> that part of your window will get redrawn? Your onPaint handler needs 
> to be able to recreate the entire window to reflect your current state.
> As a general rule, your mainline code should update variables and lists, and then call Refresh to trigger a call to onPaint to do the drawing.

OK Tim, I see your point. I'll have to rethink the logic of what I'm 
trying to achieve.

Fill_Board() creates a grid of randomly coloured squares. As it stands, 
resizing the window will recreate the board but with a different set of 
randomly coloured squares which is not what I want. The creation of the 
randomly coloured squares should be a one-time action and that's where a 
boolean one-time variable should take control. It seems clumsy to me at 
the moment, maybe the idea just needs some refining.

-- 

Regards,
Phil

-- 
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/wxpython-users/c5ecbd9a-57bb-90d2-a2d6-3e7aad74144a%40gmail.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.