Re: how to resize a top level base widget [message #83824] |
Mon, 08 April 2013 11:26 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
superchromix writes:
> Well, this is basically what you are doing in your resizing examples -
> you resize the draw widget according to the resize event generated by
> the base.
Well, not exactly. You wrote before:
> As far as I can ascertain, the correct way to resize a TLB is to
> resize the widgets contained within it.
I would say my approach is to lay out ALL my widgets in as many row and
column base widgets as I need to achieve the desired layout in the GUI.
(I normally set YPAD, XPAD, and SPACING to 0 in these layout base
widgets.) Then, I simply resize the TLB according to the new values in
the resize event structure and let everyone inside jostle around by
themselves until they have achieved their new locations.
The only exceptions I think I have ever made is some accommodation for
draw widgets. I sometimes resize these individually in the resize event
handler, in an attempt to keep them some percentage of the total overall
size of the top-level base. But draw widgets are, essentially, the ONLY
widgets I ever explicitly size.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thue. ("Perhaps thos speakest truth.")
|
|
|
Re: how to resize a top level base widget [message #83830 is a reply to message #83824] |
Sat, 06 April 2013 13:44  |
markb77
Messages: 217 Registered: July 2006
|
Senior Member |
|
|
On Apr 6, 10:03 pm, Coyote <sageande...@gmail.com> wrote:
> Well, I've been writing widget programs since the day they came out, and I have to admit I have never done anything remotely similar to what you suggest. :-)
>
> I suppose it is one way to to it. Sounds like a hell of a lot of work to me, though.
>
> Cheers,
>
> David
Well, this is basically what you are doing in your resizing examples -
you resize the draw widget according to the resize event generated by
the base.
I forgot to say that in my application I am only manually resizing the
widgets whose size isn't automatically managed by the tlb... My TLB
specifies COLUMN=1. It contains three base widgets in a column. The
middle base widget is a "bulletin board" base (it doesn't specify the
ROW or COLUMN keywords) so I have to set the positions and sizes of
the widgets it contains manually. It is only the size of those
widgets that I am updating (for example, my DRAW widget). In doing
so, this changes the size of the TLB.
A few years ago you posted about wanting to resize your TLB to match
the aspect ratio of the image you were displaying. You were running
into problems when using WIDGET_CONTROL to set the size of the TLB. I
ran into the same problem, and this is how I solved it...
best,
Mark
|
|
|