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

Home » Public Forums » archive » Re: base widgets growing uncontrollably.... ?
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: base widgets growing uncontrollably.... ? [message #25875] Thu, 26 July 2001 09:06 Go to next message
Paul van Delst is currently offline  Paul van Delst
Messages: 364
Registered: March 1997
Senior Member
Marc Schellens wrote:
>
> Paul van Delst wrote:
>> I'm seeing a weird effect with an IDL widget app I put together and I'm hoping someone
>> here might recognise the symptoms and inform me of some widget_base keyword I have
>> forgotten.
>>
>> I create a base within which I create several compound widgets (that I wrote) each, of
>> course, within it's own base. Currently I have three compund widgets in the base (all of
>> which contains exclusive button bases); two with column=1 and the third with grid_layout=1
>> and column=3. Now, when I add more buttons to the third compound widget (currently I have
>> three columns of five buttons), the size of the other compound widgets grow! It's at the
>> point now where half of the space in the widget display is just empty, dead space. If I
>> remove items from the third compund widget (which is always of a size such there is no
>> empty space) the dead space in the other two shrinks.
>>
>> Anyone have an idea what I'm doing wrong and how to fix it? I would rather not have to use
>> XSIZE/YSIZE/etc keywords.>
>
> As I understood you modify an already realized widget.
> I had similar experience, even without grid layout bases some time ago.
> What helped me was using:
>
> widget_control,tlb,UPDATE=0 (1)
>
> before (after) the modification.
> Thisway the sizes were correct and the speed the changes were
> carried out was drastically higher.
>
> Hope that helps,

WOOHOO! That did it! Inserting the UPDATE in the following code fixed the problem.

You're a star! This problem was annoying the crap outta me to the point of tossing and
turning at night.

Onya!

paulv


<-----not very pretty, >80 columns code follows------>

; -------------------------
; Create the widget display
; -------------------------

; Create the main bases
id = WIDGET_BASE( MAP = 0, COLUMN = 1 )

widget_control, id, update = 0 ; <---- new

base_id = WIDGET_BASE( id, $
GROUP_LEADER = id, $
MAP = map, $
ROW = 1 )

; -- Create the select base
select_base_id = WIDGET_BASE( base_id, $
GROUP_LEADER = id, $
MAP = map, $
COLUMN = 2 )

; Create the select sensor widget
select_sensor_id = rtview_select_sensor( select_base_id, $
GROUP_LEADER = select_base_id, $
MAP = map, $
debug = debug )

; Create the select profile widget
select_profile_id = rtview_select_profile( select_base_id, $
new_K.n_profiles, $
GROUP_LEADER = select_base_id, $
MAP = map, $
debug = debug )

; Create the select output widget
select_output_id = rtview_select_output( select_base_id, $
GROUP_LEADER = select_base_id, $
MAP = map, $
debug = debug )

; -- Create the display base
display_base_id = WIDGET_BASE( base_id, $
GROUP_LEADER = id, $
MAP = map, $
COLUMN = 1 )

; -- Create the display widget
display_id = rtview_display( display_base_id, $
GROUP_LEADER = display_base_id, $
MAP = map, $
debug = debug )

; Create the exit button
action_base_id = WIDGET_BASE( id, $
GROUP_LEADER = id, $
MAP = map, $
ROW = 1 )

quit_id = WIDGET_BUTTON( action_base_id, $
GROUP_LEADER = id, $
EVENT_PRO = 'rtview_event', $
ALIGN_CENTER = 1, $
VALUE = 'Done', $
XSIZE = 100 )

widget_control, id, update = 1 ; <---- new

; Realise and map the widget heirarchy
WIDGET_CONTROL, id, /REALIZE, MAP = 1


--
Paul van Delst A little learning is a dangerous thing;
CIMSS @ NOAA/NCEP Drink deep, or taste not the Pierian spring;
Ph: (301)763-8000 x7274 There shallow draughts intoxicate the brain,
Fax:(301)763-8545 And drinking largely sobers us again.
Alexander Pope.
Re: base widgets growing uncontrollably.... ? [message #25876 is a reply to message #25875] Thu, 26 July 2001 08:58 Go to previous messageGo to next message
Paul van Delst is currently offline  Paul van Delst
Messages: 364
Registered: March 1997
Senior Member
"Pavel A. Romashkin" wrote:
>
> I think that for the bases using /grid the width of all columns is equal
> to that of the widest member of the tree. Are you sure that some
> copy/paste code writing did not put /grid into the definition of the
> parent base?

No because I actually wrote the code with teh GRID keyword last. I have removed the GRID
keyword and now use a column base, but still the same problem.

paulv

p.s. Good point though - you made me double check :o)

--
Paul van Delst A little learning is a dangerous thing;
CIMSS @ NOAA/NCEP Drink deep, or taste not the Pierian spring;
Ph: (301)763-8000 x7274 There shallow draughts intoxicate the brain,
Fax:(301)763-8545 And drinking largely sobers us again.
Alexander Pope.
Re: base widgets growing uncontrollably.... ? [message #25884 is a reply to message #25876] Thu, 26 July 2001 05:20 Go to previous messageGo to next message
Alex Schuster is currently offline  Alex Schuster
Messages: 124
Registered: February 1997
Senior Member
Paul van Delst wrote:

> I create a base within which I create several compound widgets (that I wrote) each, of
> course, within it's own base. Currently I have three compund widgets in the base (all of
> which contains exclusive button bases); two with column=1 and the third with grid_layout=1
> and column=3. Now, when I add more buttons to the third compound widget (currently I have
> three columns of five buttons), the size of the other compound widgets grow! It's at the
> point now where half of the space in the widget display is just empty, dead space. If I
> remove items from the third compund widget (which is always of a size such there is no
> empty space) the dead space in the other two shrinks.
>
> Anyone have an idea what I'm doing wrong and how to fix it? I would rather not have to use
> XSIZE/YSIZE/etc keywords.

Well, well, well. Isn't that the old
IDL-5.0-or-which-version-was-it-widget-growing-bug, probably related to
http://www.dfanning.com/idl5_info/tlb_resize_problem.html ? Which,
according to RSI, was a bug, and they wanted to fix it really soon?
Which they never did? At least I never heard of that.

WIDGET_CONTROL, UPDATE=0/1 seems to do the trick, at least in most
cases.


PS: Could you do a WIDGET_CONTROL, Netscape_ComposeWindow, XSIZE=72?
This makes your posting easier / less horrible to read for people with
news clients set to 80 characters per line, and I could quote your text
without enlarging my composing window.

Alex
--
Alex Schuster Wonko@planet-interkom.de
alex@pet.mpin-koeln.mpg.de
Re: base widgets growing uncontrollably.... ? [message #25888 is a reply to message #25884] Thu, 26 July 2001 00:57 Go to previous messageGo to next message
marc schellens[1] is currently offline  marc schellens[1]
Messages: 183
Registered: January 2000
Senior Member
Paul van Delst wrote:
> I'm seeing a weird effect with an IDL widget app I put together and I'm hoping someone
> here might recognise the symptoms and inform me of some widget_base keyword I have
> forgotten.
>
> I create a base within which I create several compound widgets (that I wrote) each, of
> course, within it's own base. Currently I have three compund widgets in the base (all of
> which contains exclusive button bases); two with column=1 and the third with grid_layout=1
> and column=3. Now, when I add more buttons to the third compound widget (currently I have
> three columns of five buttons), the size of the other compound widgets grow! It's at the
> point now where half of the space in the widget display is just empty, dead space. If I
> remove items from the third compund widget (which is always of a size such there is no
> empty space) the dead space in the other two shrinks.
>
> Anyone have an idea what I'm doing wrong and how to fix it? I would rather not have to use
> XSIZE/YSIZE/etc keywords.>

As I understood you modify an already realized widget.
I had similar experience, even without grid layout bases some time ago.
What helped me was using:

widget_control,tlb,UPDATE=0 (1)

before (after) the modification.
Thisway the sizes were correct and the speed the changes were
carried out was drastically higher.

Hope that helps,
marc
Re: base widgets growing uncontrollably.... ? [message #25893 is a reply to message #25888] Wed, 25 July 2001 13:32 Go to previous messageGo to next message
Pavel A. Romashkin is currently offline  Pavel A. Romashkin
Messages: 531
Registered: November 2000
Senior Member
I think that for the bases using /grid the width of all columns is equal
to that of the widest member of the tree. Are you sure that some
copy/paste code writing did not put /grid into the definition of the
parent base?
Cheers,
Pavel
Re: base widgets growing uncontrollably.... ? [message #25964 is a reply to message #25875] Thu, 26 July 2001 22:11 Go to previous message
marc schellens[1] is currently offline  marc schellens[1]
Messages: 183
Registered: January 2000
Senior Member
> WOOHOO! That did it! Inserting the UPDATE in the following code fixed the problem.
>
> You're a star! This problem was annoying the crap outta me to the point of tossing and
> turning at night.
>
> Onya!
>
> paulv

Thanks,
I have to pass the compliment to Stein Vidar Hagfors Haugan,
actually I think I got it long time ago from Davids page Alex
mentioned below (but didn't remeber from where I had it).

Anyway, good that it helped you!

But was astonishes me is, that you use the update BEFORE
the base is realized.
I didn't know that update makes a difference then.

What I do not understand in your program is,
why you first unmap the base during creation
and then map it when realizing?
Until a base is realized (= brough to screen) mapping didn't matter
(at least for the tlb).

OR: Might it be that in the real program the realizing is done before
and
so the realizing there is unnecessary (which would also explain the
astonishing effect of update to non realized widgets)?

marc
Re: base widgets growing uncontrollably.... ? [message #25974 is a reply to message #25884] Thu, 26 July 2001 09:10 Go to previous message
Paul van Delst is currently offline  Paul van Delst
Messages: 364
Registered: March 1997
Senior Member
Alex Schuster wrote:
>
> Paul van Delst wrote:
>
>> I create a base within which I create several compound widgets (that I wrote) each, of
>> course, within it's own base. Currently I have three compund widgets in the base (all of
>> which contains exclusive button bases); two with column=1 and the third with grid_layout=1
>> and column=3. Now, when I add more buttons to the third compound widget (currently I have
>> three columns of five buttons), the size of the other compound widgets grow! It's at the
>> point now where half of the space in the widget display is just empty, dead space. If I
>> remove items from the third compund widget (which is always of a size such there is no
>> empty space) the dead space in the other two shrinks.
>>
>> Anyone have an idea what I'm doing wrong and how to fix it? I would rather not have to use
>> XSIZE/YSIZE/etc keywords.
>
> Well, well, well. Isn't that the old
> IDL-5.0-or-which-version-was-it-widget-growing-bug, probably related to
> http://www.dfanning.com/idl5_info/tlb_resize_problem.html ?

Hmm, I don't know about that. I'm not resizing the tlb interactively. But who
knows? might be.

> Which,
> according to RSI, was a bug, and they wanted to fix it really soon?
> Which they never did? At least I never heard of that.
>
> WIDGET_CONTROL, UPDATE=0/1 seems to do the trick, at least in most
> cases.

Yes that worked (see previous reply to Marc Schellens)

> PS: Could you do a WIDGET_CONTROL, Netscape_ComposeWindow, XSIZE=72?

72?? What are you - an IDL or a fortran-77 programmer? :o))

> This makes your posting easier / less horrible to read for people with
> news clients set to 80 characters per line, and I could quote your text
> without enlarging my composing window.

While I think you should get a different news reader, I'll compromise at
XSIZE=80. :o)

paulv

--
Paul van Delst A little learning is a dangerous thing;
CIMSS @ NOAA/NCEP Drink deep, or taste not the Pierian spring;
Ph: (301)763-8000 x7274 There shallow draughts intoxicate the brain,
Fax:(301)763-8545 And drinking largely sobers us again.
Alexander Pope.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Subregion in table widget
Next Topic: plotting two sets of contours

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

Current Time: Wed Oct 08 13:52:27 PDT 2025

Total time taken to generate the page: 0.00671 seconds