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

Home » Public Forums » archive » Obtain all child 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
Obtain all child widgets [message #81189] Mon, 20 August 2012 11:09
Russell Ryan is currently offline  Russell Ryan
Messages: 122
Registered: May 2012
Senior Member
Ok, this must be easy and I'm just having "one of those days". I have a widget hierarchy, and it creates a series of buttons using the /menu feature in widget_button. But, I'd like to get the widget IDs of all the children. Suppose:

base=widget_base(/col)
but=widget_button(base,value='top',/menu)
but1=widget_button(but,value='First level',/menu)
b11=widget_button(but1,value='First button',uval='firstbutton',group=but)
b12=widget_button(but1,value='Second button',uval='secondbutton',group=but)
but2=widget_button(but,value='First level',/menu)
b21=widget_button(but2,value='First button',uval='firstbutton',group=but)
b22=widget_button(but2,value='Second button',uval='secondbutton',group=but)


Now, I'd like to call something which will take as input the variable 'but' (as above) and return (in this example) a four element vector of widget IDs. I know widget_info(/child) but that only returns the first child. I suppose I could "nest" the group leaders, where the current button has the previous as a leader. Then just recursively call widget_info(/child), but that seems like a lot of work and requires the children be "serially" listed.

I've scoured the widget_info and widget_control pages. It really feels like this should not only be possible, but pretty simple. I must be missing something...

Any ideas?
Russell
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Mosaic
Next Topic: Finding all the possible subsets of a given vector

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

Current Time: Wed Oct 08 13:34:08 PDT 2025

Total time taken to generate the page: 0.00614 seconds