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

Home » Public Forums » archive » Re: widget_base alignment question
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: widget_base alignment question [message #42725 is a reply to message #42621] Mon, 21 February 2005 12:53 Go to previous message
JD Smith is currently offline  JD Smith
Messages: 850
Registered: December 1999
Senior Member
On Thu, 17 Feb 2005 09:04:35 -0700, eddie haskell wrote:

>> I'd like to create a resizable widget app which looks
>> kind of like this:
>>
>> +-----------------------------------------------+
>> | LEFT_ALIGNED_LABEL RIGHT_ALIGNED_LABEL |
>> | |
>> | draw widget |
>> | some other stuff... |
>> +-----------------------------------------------+
>>
>> but I can't figure out if this is possible in IDL. The
>> top-level base has COLUMN set, and then into that I
>> first place a widget_base with ROW set.
>
> The trick is to make the base for your labels a column base instead of a
> row base. Yes this sounds odd, but the column keyword also is able to
> specify the number of columns in a base, and this helps here. The other
> needed part is to make the base gridded. The base definition would look
> something like this:
>
> wRow = widget_base(tlb, xsize=xsize, column=2, /grid)
>
> Below is a very simple test case that handles resizing only in the X
> direction. You can see that just by re-setting the xsize on the row
> base that the labels will jump to where you want them to be. You must
> set the xsize in order for this to happen, it will not resize and
> reposition automagically, but carrying around an additional widget ID is
> not that hard.

Useful layout trick. Does this work for everyone? Why does Linux
suffer here? Unless I realize the widgets first, and set the xsize
after, the labels are piled up on each other (see
turtle.as.arizona.edu/idl/test_pre.png and
turtle.as.arizona.edu/idl/test_fix.png). But even that doesn't really
fix it, cutting off part of the "t" in "right".

Then when it gets resized, and a TLB_SIZE_EVENTS comes in, it is clearly
lying about the "frame-free" size of the usable window area, and the
widgets are resized to overfill the window (see
turtle.as.arizona.edu/idl/test_post.png). Does anyone at RSI actually go
through the layout on all of their systems to see what works?

JD
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: how to rerun subroutine only?
Next Topic: Re: tick label problem

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

Current Time: Sun Oct 12 13:44:26 PDT 2025

Total time taken to generate the page: 1.20810 seconds