The actions of the bin s are still vague to me as to how and when widgets
stretch or not. As I understand, bin h and bin v create bins or rectangular
boxes in which other widgets can be placed either horizontally or
vertically. The "s" parameter can modify how widgets within a bin are
placed. But "s" should not affect how widgets outside the containing bin
are placed, other than changing the size of the bin. Below is a script
which creates 6 forms. The top two show two forms with bins to be put into
the forms below. Those in the right column contain an "s" and those on the
left do not. The middle row places the bins horizontally and the bottom row
vertically.

The bottom right seems to work right as the "s" in the second bin does not
affect how the widgets in the first bin act. The still stretch as expected.
However the middle right form the enclosed bins seems to be ignored as the
left 3 buttons stay to the left when stretched horizontally. Shouldn't the
first two buttons stretch and the last two separate?

Just to confuse me more I modified the "bin z" in form "b0" to "bin sz"
(the first form) and then the form B0HS1 works properly.


NB. wd 'reset;'  NB. Remove NB. for easy closing the forms

b0=:0 : 0
bin h;
cc b00 button;cn B00;
cc b01 button;cn B01;
bin sz;
)

b1=:0 : 0
bin h;
cc b10 button;cn B10;
cc b11 button;cn B11;
bin z;
)

bs1=:0 : 0
bin h;
cc b10 button;cn B10;
bin s0;
cc b11 button;cn B11;
bin z;
)

wd 'pc B0 closeok;pn B0;'
wd b0
wd 'pmove 0 0 _1 _1;'
wd 'pshow;'

wd 'pc BS1 closeok;pn BS1;'
wd bs1
wd 'pmove 600 0 _1 _1;'
wd 'pshow;'

wd 'pc B0H1 closeok; pn B0H1;'
wd 'bin h;'
wd b0
wd b1
wd 'bin z;'
wd 'pmove 0 100 _1 _1;'
wd 'pshow;'

wd 'pc B0HS1 closeok; pn B0HS1;'
wd 'bin h;'
wd b0
wd bs1
wd 'bin z;'
wd 'pmove 600 100 _1 _1;'
wd 'pshow;'

wd 'pc B0V1 closeok; pn BV1;'
wd 'bin v;'
wd b0
wd b1
wd 'bin z;'
wd 'pmove 0 200 _1 _1;'
wd 'pshow;'

wd 'pc B0VS1 closeok; pn BVS1;'
wd 'bin v;'
wd b0
wd bs1
wd 'bin z;'
wd 'pmove 600 200 _1 _1;'
wd 'pshow;'
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to