Re: widget sizing [message #52220] |
Thu, 11 January 2007 03:59 |
Wox
Messages: 184 Registered: August 2006
|
Senior Member |
|
|
Thanks, it works. For some reason I didn't try that.
On Wed, 10 Jan 2007 10:05:28 -0700, David Fanning <news@dfanning.com>
wrote:
> Ah, well, if you leave out the "YSIZE=n" keyword, I think
> it works like you expect it to.
|
|
|
Re: widget sizing [message #52232 is a reply to message #52220] |
Wed, 10 January 2007 09:05  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Wox writes:
> Euhm... the text widget has the correct size, it is the parent base
> widget which doesn't.
>
> I stripped of all unnecessary things. Pushing "make" shows what I
> mean:
>
>
> pro test_event,ev
> widget_control,ev.top,get_uvalue=base
> n=50
>
> t=widget_text(base,value=replicate('text',n),ysize=n,/SCROLL ,scr_ysize=100)
> end
>
>
> pro test
> base=widget_base(/row)
> bt=widget_button(base,value='make')
> ch=widget_base(base,/column)
> WIDGET_CONTROL,base, /REALIZE,set_uvalue=ch
> Xmanager,'test',base,/NO_BLOCK
> end
Ah, well, if you leave out the "YSIZE=n" keyword, I think
it works like you expect it to.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: widget sizing [message #52233 is a reply to message #52232] |
Wed, 10 January 2007 08:48  |
Wox
Messages: 184 Registered: August 2006
|
Senior Member |
|
|
Euhm... the text widget has the correct size, it is the parent base
widget which doesn't.
I stripped of all unnecessary things. Pushing "make" shows what I
mean:
pro test_event,ev
widget_control,ev.top,get_uvalue=base
n=50
t=widget_text(base,value=replicate('text',n),ysize=n,/SCROLL ,scr_ysize=100)
end
pro test
base=widget_base(/row)
bt=widget_button(base,value='make')
ch=widget_base(base,/column)
WIDGET_CONTROL,base, /REALIZE,set_uvalue=ch
Xmanager,'test',base,/NO_BLOCK
end
On Wed, 10 Jan 2007 07:45:44 -0700, David Fanning <news@dfanning.com>
wrote:
> At least in IDL 6.3 in Windows, the screen size of the widget
> is always what is displayed.
|
|
|
Re: widget sizing [message #52235 is a reply to message #52233] |
Wed, 10 January 2007 06:45  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Wox writes:
> Imagine this: you have a base widget, containing a tab widget and one
> of the tabs contains a multiline text widget. Since the number of
> lines can be too much, I use "ysize=nlines,scr_ysize=200,/SCROLL" when
> creating the text widget.
>
> Now the tab widget resizes according to the screen size of the text
> widget, but the base widget doesn't. It's still as big as if you
> wouldn't use "scr_ysize=200,/SCROLL".
>
> Am I missing something or is this "normal" IDL behavour?
At least in IDL 6.3 in Windows, the screen size of the widget
is always what is displayed.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|