This looks OK to me. The example is given below. The form has a horizontal bin, containing two horizontal bins.
1. In the original form, stretching occurs only between B10 and B11, and indeed this is the only place in the form where there is a stretch parameter. 2. In the modified form (with the first bin z replaced by bin sz), there are now two stretch parameters. The first stretch parameter allows the first horizontal bin to stretch, so in the modified form there are two stretches: * both horizontal bins stretch to grab half the horizontal space each * in the first bin, the new space appears at the end of the bin * in the second bin, the new space appears in the middle of the bin wd 0 : 0 pc B0HS1 closeok; pn B0HS1; bin h; bin h; cc b00 button;cn B00; cc b01 button;cn B01; bin z; bin h; cc b10 button;cn B10; bin s0; cc b11 button;cn B11; bin z; bin z; pmove 600 100 _1 _1; pshow; ) On Tue, Oct 21, 2014 at 2:01 PM, Don Guinn <[email protected]> wrote: > 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 > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
