Chnage the NO_BLOCK value in XMANAGER [message #65074] |
Wed, 11 February 2009 11:45 |
natha
Messages: 482 Registered: October 2007
|
Senior Member |
|
|
Anybody knows how to change the BLOCK (/NO_BLOCK) value of the
XMANAGER... ?
I've a widget that use events and I want a BLOCK value for the
XMANAGER while the widget is MAPPED (MAP=1) and NO_BLOCK value while
the widget is unmapped (MAP=0).
Is it possible ?
I tried something like this in my class widget:
;; definition
FUNCTION widget::Init
self.base=WIDGET_BASE(/FRAME, TITLE='COMPARISON', UVALUE=self, $
/TLB_KILL_REQUEST_EVENTS, /KBRD_FOCUS_EVENTS)
;;; more widgets
RETURN, 1
END
;; method to show the widget
PRO widet::display
WIDGET_CONTROL, self.base, /MAP
XMANAGER, widgetEventHandler', self.base,
EVENT_HANDLER='GenericClassEventHandler', $
NO_BLOCK=0
END
;; event handler
PRO widget::EventHandler, event
IF TAG_NAMES(event, /STRUCTURE_NAME) EQ 'WIDGET_KILL_REQUEST' THEN
BEGIN
WIDGET_CONTROL, self.base, MAP=0
XMANAGER, 'widgetEventHandler', self.base, $
EVENT_HANDLER='GenericClassEventHandler', /NO_BLOCK
ENDIF ELSE BEGIN
;;;more events
ENDELSE
END
It works but the problem is when I call the display method for a
second time. Set the NO_BLOCK property to 0 after setted it to 1
doesn't works.
|
|
|