You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by Edvin Syse <ed...@sysedata.no> on 2011/05/07 00:17:12 UTC

Change layout for Form.Section

Form.Section elements are laid out vertically, but I'd like to have for 
example two sections side by side some places. Is it possible to control 
the layout of Form.Section somehow?

-- Edvin

Re: Change layout for Form.Section

Posted by Edvin Syse <ed...@sysedata.no>.

Den 07.05.2011 15:45, skrev Edvin Syse:

> If I can't have two sections side by side, I'd atleast like to have to
> fields with it's own label on each line, to use more of the screen real
> estate.

I guess I could use two separate Forms with each Section, wrapped in a 
BoxPane or something...

-- Edvin

Re: Change layout for Form.Section

Posted by Greg Brown <gk...@verizon.net>.
> Den 07.05.2011 18:01, skrev Greg Brown:
>> You need to put the Form.label attribute on the field itself. In this case, the field is the outer BoxPane.
> 
> OK, but that means I cannot have two fields with different labels on the same line, right?

You could do this by putting the fields in a BoxPane and manually creating the second label, but you are correct that Form does not support this natively.



Re: Change layout for Form.Section

Posted by Edvin Syse <ed...@sysedata.no>.

Den 07.05.2011 18:01, skrev Greg Brown:
> You need to put the Form.label attribute on the field itself. In this case, the field is the outer BoxPane.

OK, but that means I cannot have two fields with different labels on the 
same line, right? Anyways, it seems to be working great by placing two 
forms side by side. The excellent load/store "bubbeling" takes care of 
business anyways :)

-- Edvin

Re: Change layout for Form.Section

Posted by Greg Brown <gk...@verizon.net>.
You need to put the Form.label attribute on the field itself. In this case, the field is the outer BoxPane.

On May 7, 2011, at 9:45 AM, Edvin Syse wrote:

> 
> 
> Den 07.05.2011 14:02, skrev Greg Brown:
>> Horizontal form layout is not supported, but you can use additional layout containers to customize the layout of individual fields. For example:
>> 
>> <Form>
>>   <Form.Section>
>>     <BoxPane>
>>         <TextInput/>
>>         <PushButton/>
>>     </BoxPane>
>>     ...
> 
> If I can't have two sections side by side, I'd atleast like to have to fields with it's own label on each line, to use more of the screen real estate. It tried this:
> 
>    <Form>
>        <Form.Section>
>            <BoxPane>
>                <BoxPane Form.label="Label1">
>                    <TextInput/>
>                </BoxPane>
> 
>                <BoxPane Form.label="Label2">
>                    <TextInput"/>
>                </BoxPane>
>            </BoxPane>
> 	    ....
> 
> .. but then the labels are lost. What could I do to support such a layout?
> 
> -- Edvin
> 
>> 
>> On May 6, 2011, at 6:17 PM, Edvin Syse wrote:
>> 
>>> Form.Section elements are laid out vertically, but I'd like to have for example two sections side by side some places. Is it possible to control the layout of Form.Section somehow?
>>> 
>>> -- Edvin
>> 


Re: Change layout for Form.Section

Posted by Edvin Syse <ed...@sysedata.no>.

Den 07.05.2011 14:02, skrev Greg Brown:
> Horizontal form layout is not supported, but you can use additional layout containers to customize the layout of individual fields. For example:
>
> <Form>
>    <Form.Section>
>      <BoxPane>
>          <TextInput/>
>          <PushButton/>
>      </BoxPane>
>      ...

If I can't have two sections side by side, I'd atleast like to have to 
fields with it's own label on each line, to use more of the screen real 
estate. It tried this:

     <Form>
         <Form.Section>
             <BoxPane>
                 <BoxPane Form.label="Label1">
                     <TextInput/>
                 </BoxPane>

                 <BoxPane Form.label="Label2">
                     <TextInput"/>
                 </BoxPane>
             </BoxPane>
	    ....

.. but then the labels are lost. What could I do to support such a layout?

-- Edvin

>
> On May 6, 2011, at 6:17 PM, Edvin Syse wrote:
>
>> Form.Section elements are laid out vertically, but I'd like to have for example two sections side by side some places. Is it possible to control the layout of Form.Section somehow?
>>
>> -- Edvin
>

Re: Change layout for Form.Section

Posted by Greg Brown <gk...@verizon.net>.
Horizontal form layout is not supported, but you can use additional layout containers to customize the layout of individual fields. For example:

<Form>
  <Form.Section>
    <BoxPane>
        <TextInput/>
        <PushButton/>
    </BoxPane>
    ...

On May 6, 2011, at 6:17 PM, Edvin Syse wrote:

> Form.Section elements are laid out vertically, but I'd like to have for example two sections side by side some places. Is it possible to control the layout of Form.Section somehow?
> 
> -- Edvin