[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Widget width in vertical base



Hmmm.  Well, your solution seems like it will work
initially, but not after a resize.  I probably was not
clear.  I have an image in a draw widget, which I can
resize by resizing the window.  When I do that, I would like
the sliders to resize themselves to be the same size as
the draw widget.  Similar to how a scrolled window would
look.

Previously (5.1), just by putting the sliders in the same
vertical base as the draw widget, when I resized the draw
widget, the sliders resized themselves to match, which is
what the documentation seems to say they should do.
normally, I might suspect a window manager decision had
caused this, but I've only upgraded IDL, not anthing else.

Now (5.2.1), the sliders come up their default size to begin with,
and don't resize themselves at all.  Previously (5.1), when I tried
explicitly setting their initial sizes (different UI configuration),
I was unsucessful at later resizing them explicitly.  I can't
remember exactly how it didn't work though.  I haven't tried
it yet in 5.2.1

It seems like they just got rid of some smarts.

-Jonathan


David Fanning wrote:

> 
> Although I have been a loud and vocal advocate of NOT
> using specific sizing in widget programs, I will be
> the first to admit that opening yourself up to the
> natural sizing of widgets in cross-platform and
> cross-version development efforts is a recipe for
> disaster. :-(
> 
> Thus, for size-critical widgets, I've developed
> a hybrid technique. I lay things out in the normal
> Column/Row bases I've always advocated. But at the
> end, just before I realize the widget hierarchy,
> I find out just how big a particular widget is by
> getting it's geometry. Then, I might size a particular
> widget to be a certain percentage of this size.
> 
> For example, suppose I have a label next to a text
> widget in a row text base. And I want the text widget
> sized so that it is 80 percent of the draw widget
> just below it in the program, which should be just
> as long as the text base. I might do something like
> this:
> 
>    dGeom = Widget_Info(drawID, /Geometry)
>    Widget_Control, textbaseID, Scr_Xsize=dGeom.scr_xsize
>    Widget_Control, textID, Scr_Xsize=dGeom.scr_xsize * 0.8
> 
> That gives me some control without completely destroying
> all the advantages of the column/row paradigm.
> 
> Cheers,
> 
> David
> 
> --
> David Fanning, Ph.D.
> Fanning Software Consulting
> Phone: 970-221-0438 E-Mail: davidf@dfanning.com
> Coyote's Guide to IDL Programming: http://www.dfanning.com/
> Toll-Free IDL Book Orders: 1-888-461-0155

-- 

-Jonathan