| Re: explicit redraw does nothing until expose(?) event - IDLitComponent propertysheets [message #39097 is a reply to message #39096] |
Thu, 22 April 2004 18:55   |
sdettrick
Messages: 14 Registered: December 2003
|
Junior Member |
|
|
> How are you sending the event to your button handler? Are you simply calling
> the method directly? Or are you trying to use widget_control with
> send_event? Using send_event would be a bad idea.
I don't even know what send_event is. Instead I am sending the button
event using the EVENT_PRO keyword to specify a proxy event handler
called handle_all_events:
button = WIDGET_BUTTON( wpopup, $
value='Re-draw window', $
event_pro='handle_all_events', $
UVALUE = {object:self, $
method:'ReDraw'} $
)
The handle_all_events routine inspects the UVALUE of the widget
causing the event, and uses CALL_METHOD to call my ReDraw method on
the object (David Fanning credits Stein Vidar for this idea)
PRO Handle_All_Events, event
Widget_Control, event.id, Get_UValue=info
Call_Method, info.method, info.object, event
END
I can't see why that should change anything. But could CALL_METHOD
somehow slow things down?
>
> Why not simply add a win->draw at the end of your property sheet event
> handler? You know that if a property changes, you want to redraw.
>
Well I tried that too. It doesn't change the behaviour. I think that
for some reason the events are just not making it to the event handler
until I interact with the draw window. Could they be trying to go
somewhere else, e.g. into a non-existent iTool?
To answer David's question:
> What happens if you remove the FLOATING keyword from
> the pop-up? Sounds like a semi-modal widget problem to
> me. I wonder if the FLOATING keyword has something to
> do with that?
Good question. I pull out the FLOATING keyword and the behaviour
doesn't change, only the popup appears on a different part of the
screen. My REDRAW button event doesn't get processed any sooner.
It's a little frustrating but I haven't a clue on how to resolve it.
Any other ideas?
BTW I tried it on both Linux and Windows, and it shows the same
behaviour.
Thanks,
Sean
|
|
|
|