On Apr 03, 2007, at 21:44 UTC, Peter E. Barck wrote:
> >> The problem now: if I click on another window on the screen, so
>>> that now the focus is no longer on the RB window, the custom controls
> > > in the GroupBox become invisible
I found the problem <:-|
To minimize unnecessary re-paints (so I thought), the Canvas Paint
event had a Boolean to allow re-painting only when I clicked on a
control to change its state. What I did not realize, is that the
Paint event also fires whenever the Window looses focus, i.e.,
deactivates. Since the drawing method was blocked from doing its
job, the control went blank. Removing this Boolean, the control now
redraws when the Window deactivates and stays visible, the way it
should.
Now I have another question: Is there a way for a Canvas to
receive notice when its parent gets disabled? I could add a timer
for periodic checking of its parent enabled status. I find that a
clumsy work around! The Canvas does see when its parent gets
de-activated, but not disabled.
Thanhs for any suggestions.
--
Cheers,
Peter
TI PowerBook G4, 1GHz, 1GB RAM, OSX 10.3.9, RB2007r2 Pro
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>