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

Home » Public Forums » archive » Re: widget_base and windows position
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
Re: widget_base and windows position [message #42055] Mon, 20 December 2004 14:17
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Francois L. writes:

> I want to draw a Top Level Base containing three sub-windows like this:
> Window 1, large, on the top.
> Window 2, medium, bellow window 1.
> Window 3, small, right of window 2 and bellow window 1.
>
> With the following code, windows 2 and 3 are on top of window 1:
> ------------------------------------------------------------ ------
> tlb = widget_base(title='top level base',/row)
> baseLeft = widget_base(tlb, /column)
> baseRight = widget_base(tlb, /column)
> BaseLeftBottom = widget_base(baseLeft, /row)
> w1 = widget_draw(BaseLeft, xsize=512, ysize=512)
> w3 = widget_draw(BaseLeftBottom, xsize=256, ysize=256)
> w4 = widget_draw(BaseLeftBottom, xsize=128, ysize=128)
> widget_control, tlb, /realize
> ------------------------------------------------------------ -----
>
> What would be the correct code for placing window 1 above ?

It would be something like this:

tlb = widget_base(title='top level base',/column, base_align_center=1)
basetop = widget_base(tlb, row=1)
basebot = widget_base(tlb, row=1, base_align_center=1)
baseLeft = widget_base(basebot, /column)
baseRight = widget_base(basebot, /column)
w1 = widget_draw(basetop, xsize=512, ysize=512)
w3 = widget_draw(baseLeft, xsize=256, ysize=256)
w4 = widget_draw(baseRight, xsize=128, ysize=128)
widget_control, tlb, /realize

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: widget_base and windows position [message #42057 is a reply to message #42055] Mon, 20 December 2004 13:54 Go to previous message
Benjamin Hornberger is currently offline  Benjamin Hornberger
Messages: 258
Registered: March 2004
Senior Member
Francois L. wrote:
> Hello,
>
> I want to draw a Top Level Base containing three sub-windows like this:
> Window 1, large, on the top.
> Window 2, medium, bellow window 1.
> Window 3, small, right of window 2 and bellow window 1.
>
> With the following code, windows 2 and 3 are on top of window 1:
> ------------------------------------------------------------ ------
> tlb = widget_base(title='top level base',/row)
> baseLeft = widget_base(tlb, /column)
> baseRight = widget_base(tlb, /column)
> BaseLeftBottom = widget_base(baseLeft, /row)
> w1 = widget_draw(BaseLeft, xsize=512, ysize=512)
> w3 = widget_draw(BaseLeftBottom, xsize=256, ysize=256)
> w4 = widget_draw(BaseLeftBottom, xsize=128, ysize=128)
> widget_control, tlb, /realize
> ------------------------------------------------------------ -----
>
> What would be the correct code for placing window 1 above ?
>
> Thank you,
>
> Francois.
>
>

How about something like:

tlb = widget_base(/col)
upper = widget_base(tlb)
lower = widget_base(tlb, col=2)
w1 = widget_draw(upper)
w2 = widget_draw(lower)
w3 = widget_draw(lower)

Benjamin
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: widget_base and windows position
Next Topic: Re: Widgets for dummies?

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

Current Time: Sat Oct 11 08:45:09 PDT 2025

Total time taken to generate the page: 1.68117 seconds