Den 06.06.2011 20:58, skrev Greg Brown:
I have a Form where I want the TextInputs to fill the space horizontally.

 From looking at the code in TerraTextInputSkin, it seems like it only cares 
about textSize, and not the surrounding container's layout (Judging from 
getPreferredSize).

No components look to their parents for sizing information. It is up to the 
parent to ask the component how it would like to be sized. textSize simply 
specifies the text input's preferred width, in characters. To stretch a text 
input beyond this, you'll need to use a container that will disregard the text 
input's preferred width. Either Form or a vertical BoxPane with fill=true will 
do this.

Nice! For some reason I though I had to encapsulate each TextInput in something to apply the Form.label, but this worked like a charm:

<TextInput Form.label="Title"/>

.. so now I saved TONS of markup, and fill:true solved my other problem as well :))

-- Edvin

Reply via email to