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

Home » Public Forums » archive » Re: finding the top-level widget in a hierarchy
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: finding the top-level widget in a hierarchy [message #41019] Thu, 16 September 2004 12:00
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Benjamin Hornberger writes:

> does anyone have a function to find the corresponding top-level base for
> a given widget ID? Or did I miss something in the documentation of
> widget_info?
>
> I know that I can do a recursive call of widget_info(ID, /parent), but I
> thought somebody might have something readily available...

Here you go, a two-liner:

parent = widgetID
WHILE Widget_Info(parent, /Parent) NE 0 DO $
parent = Widget_Info(parent, /Parent)

Cheers,

David
-------
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http:/www.dfanning.com/
Phone: 970-221-0438, IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Previous Topic: Xinteranimate
Next Topic: keeping a button widget depressed

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

Current Time: Sat Oct 11 05:51:40 PDT 2025

Total time taken to generate the page: 0.16003 seconds