comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Destroying Multiple Widgets
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Destroying Multiple Widgets [message #55722] Tue, 04 September 2007 06:19
2d is currently offline  2d
Messages: 24
Registered: July 2007
Junior Member
Could anyone help me with a widget program to create multiple widgets
which are not linked to a single base widget, so I can use the space
more economically on the screen?

All of the widget programs I have seen link descendent widgets to a
base widget via the widget_base commands, and then quit all widgets by
destroying the base widget.

The problem with this is that having all widgets within a single base
widget space means there is lots of unused space in the base widget.
Better would be to have each widget on its own so there is no unused
space in the widgets windows.

To do this a tried creating multiple base widgets and this created the
widget effectively. However, when I tried to destroy them with widget
control, IDL complained that I was supplying an invalid widget ID. As
I printed out the widget ID, I knew that it was not invalid.

I have transferred the widget ID of the second base widget to be
destroyed through a common block, as below. In programme (omitting
some lines for clarity) I had:

; Widget event handler module
pro widgets_quit, ev
common imager, base_id2
widget_control, ev.top, /destroy
widget_control, base_id2, /destroy
end

; Widget definition module.
pro widgets
common imager, base_id2
base_id = widget_base(title = 'Control', /column)
base_id2 = widget_base(title = 'Control2', /column)
quit_id = widget_button(base_id, value='finish,
event_pro='widgets_quit')
widget_control, base_id, /realize
widget_control, base_id2, /realize
xmanager, 'widgets', base_id
xmanager, 'widgets', base_id2

Problem is when I run this I get an error: % XMANAGER: Invalid widget
ID.

Any suggestions? For example is multiple xmanager calls in the widget
definition module allowed.

Thank you
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: xmlrpc
Next Topic: Re: Placing constraints on Interpol

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 04:43:57 PDT 2025

Total time taken to generate the page: 0.39588 seconds