button position [message #10684] |
Thu, 15 January 1998 00:00  |
Cathy Campo
Messages: 7 Registered: October 1997
|
Junior Member |
|
|
I would like to create a row base with one button on the far left
and one button on the far right. I can't seem to figure out how
to use /align_left or /align_right properly. I do not want the
buttons side by side.
Cathy
|
|
|
Re: button position [message #10773 is a reply to message #10684] |
Fri, 16 January 1998 00:00  |
greenwoodde
Messages: 10 Registered: October 1996
|
Junior Member |
|
|
Cathy Campo <campo@gav.gat.com> wrote:
> I would like to create a row base with one button on the far left
> and one button on the far right. I can't seem to figure out how
> to use /align_left or /align_right properly. I do not want the
> buttons side by side.
I guess this qualifies as an "ugly hack", but you could put an empty
base of the appropriate size between the two buttons. Assuming that
the 2 buttons were of the same size, the following worked for me on
5.0.2 (HP-UX) and 5.0.3 (VMS):
a = WIDGET_BASE( SCR_XSIZE=500, /ROW )
b1= WIDGET_BUTTON( a, VALUE='B1' )
g1= WIDGET_INFO( b1, /GEOMETRY)
a2= WIDGET_BASE( a, SCR_XSIZE=(500-2*(g1.SCR_XSIZE+2*g1.MARGIN+g1.XOFFSET)) )
b2= WIDGET_BUTTON( a, VALUE='B2' )
WIDGET_CONTROL, a, /REALIZE
Hth,
Dave
--------------
Dave Greenwood Internet: Greenwoodde@ORNL.GOV
Oak Ridge National Lab %STD-W-DISCLAIMER, I only speak for myself
|
|
|