Re: Widget Event_Pro question [message #59476] |
Mon, 31 March 2008 07:45  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Spon writes:
> But if I keep Event.Top as my Group_Leader, then the /ALIGN_RIGHT
> keyword doesn't seem to do a whole lot, and my graph widget sits smack
> bang on top of my image window widget.
>
> Typically, I want to have my cake *and* eat it ;-)
> I'd like my second widget base to be independent enough of its leader
> to be a separate entity, but to be *aware* enough of the leader to
> know where I want it to sit, namely glued to its right edge. Is this
> possible?
Well, ALIGN_RIGHT has the right name to give you hope,
but none of the functionality, unfortunately. That is to
say, it doesn't do what you think it does. :-)
If you want to position a top-level base next to
another top-level base, that is easily done. Find
the position and size of the first TLB:
Widget_Control, TLB_1, TLB_GET_OFFSET=offsets, $
TLB_GET_SIZE=sizes
Then, position the second TLB next to the first:
Widget_Cotnrol, TLB_2, XOFFSET=offsets[0] + sizes[0] + 10, $
YOFFSET = offsets[1]
The window is not "glued" to anything, and if either window
is moved, you won't know about it unless you have TLB_MOVE_EVENTS
set for the TLBs. If you do, you can figure out where the
window moved to and reposition things.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|