PDA

View Full Version : Dynamic ColumnWidth



threewonders
Apr 08, 2011, 9:40 AM
I have a panel with layout = "column. " In this panel I have two gridpanel, one of them hidden. As I can do that when only one is shown the columnwidth is = 1 and when it shows the hidden (#{grid2}.setVisible (true); ) is 0.5 each.

Thank you very much and sorry for my bad English.

threewonders
Apr 11, 2011, 11:47 AM
anyone know how?

David Pelaez
Apr 11, 2011, 1:45 PM
Try setting panel layout to HBox and put Flex="1" to both GridPanel

threewonders
Apr 11, 2011, 2:50 PM
I get similar behavior desired, but can not get the two gridpanel have the same width.

Can you tell me the parameter to better flex. With flex = 1 I get the same with flex = 2.

Thank you very much.

(Why some are Spanish?)

threewonders
Apr 11, 2011, 2:55 PM
You were right, it works perfectly as you said. I forgot to flex = 1 in both gridpanel. And understanding in order to flex.

Thank you very much, and you can put it as solved.

threewonders
Apr 11, 2011, 3:06 PM
how I can do that when you return to hidden the second gridpanel, first take the full width ?

and I answer myself: doLayout();