SCJP2. Please Indent your code using UBB Code
SCJP2. Please Indent your code using UBB Code
SCJP2. Please Indent your code using UBB Code
Three columns, total width is 180.
First column has the width of fieldC 2/3 = 90
Second has the width of an empty label 2/3 - 1/2 = 30
Third has the width of labelA 1/3 = 60
[ ][labelA] 2/3-1/2, 1/3
[ fieldA ][fieldB] 2/3, 1/3
[ fieldC ][ fieldD ] 1/2, 1/2
SCJP2. Please Indent your code using UBB Code
SCJP2. Please Indent your code using UBB Code
SCJP2. Please Indent your code using UBB Code
The point is to make the second column a size of 2/3 - 1/2 for the design to appear as we want. I have used a component that prints nothing for that. If we let that component with weightx 0.0 , the relationship among the columns of the grid will vary when resizing. Setting it to 2/3 - 1/2 of 1.0 keeps the proportions, also, in that case.
a) by adding more rows with "dangling" components we can overcomplicate the design with columns holdings invisible components.
b) by adding more rows, a component may be placed in a column for which its weightx setting is incovenient. Say, a component in the first column below fieldC, whose weightx is 0.7, will make the weightx of the first column 0.7 ; which is incompatible with our necessity of 0.5 for that column.
The point is to make the second column 20% of the space being used, whatever that may be. Since the Label takes up the entire space being used and has a weightx of 1.0, 0.2 should be 20% of that space. 0.5 should be 50% and 0.3 should be 30%. The right column has to be 0.3,
SCJP2. Please Indent your code using UBB Code
Can you smell this for me? I think this tiny ad smells like blueberry pie!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
|