Re: widget_control, /destroy (buttons) [message #9042 is a reply to message #8964] |
Wed, 21 May 1997 00:00  |
Mike Schienle
Messages: 37 Registered: May 1997
|
Member |
|
|
R. Bauer wrote:
>
> Hi,
> this is an example for I think a really simple way to remove buttons,
>
> =======================================
>
> n=50
> widget_control, map.xlist, get_uval=inwids
> n = n_elements(inwids)
> for i=0,n-1 do widget_control, inwids(i),/dest
>
> ========================================
>
> What is wrong whith idl on my workstation?
Cc'd to R. Bauer
Try turning off "updates" to the window manager. Your workstation is
trying to update the display every time you destroy a widget. In my
case, I have two widget hierarchies overlapping each other within the
same base (no row/column control of the base). I want to display the
widgets before the second hierarchy is created so the user sees
something quickly. The rest of the widgets take a few moments to be
created. After all of the widget hierarchies are modified, update the
base of the hierarchy.
; Only realize if we are using X Windows
; X Windows can turn off "Updates" allowing all updates to be
; performed after the commands have been issued. This can be a
; big performance boost.
IF (!Version.OS_Family EQ 'unix') THEN $
Widget_Control, wBase, /Realize
; turn off updates - not honored by all window systems
Widget_Control, wBase, Update=0
; commands to create overlapping hierarchy
...
Widget_Control, wBase, Update=1
IF NOT (Widget_Info(wBase, /Realized)) THEN $
Widget_Control, wBase, /Realize
In your case, surround your loop with the Update calls.
--
Mike Schienle Hughes STX - EROS Data Center, Sioux Falls, SD
Work: schienle@edcsgw13.cr.usgs.gov Home: mgs@sd.cybernex.net
|
|
|