You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by anton dos santos <ad...@free.fr> on 2012/04/03 23:30:36 UTC
alignment of checkbox editor in TableView
Hi
in a TableView, TableViewBooleanCellRenderer is centered in its column, but a checkbox (as editor)
is left aligned.
I'd like to have the editors aligned to the renderers
See attached picture where first row is edited and second row is not.
I tried to change the style of the checkbox, but there is no horizontalAlignment style on Checkbox.
my bxml code is :
....
<TableView.Column name="doneArLinks" width="30" headerData="%doneArLinks" >
<cellRenderer>
<content:TableViewBooleanCellRenderer/>
</cellRenderer>
</columns>
<rowEditor>
<content:TableViewRowEditor editEffect="horizontal_slide">
<cellEditors>
<doneArLinks>
<Checkbox selectedKey="doneArLinks" />
</doneArLinks>
....
How can I make my checkbox editors centered like the renderers ?
Thanks
Anton
Re: alignment of checkbox editor in TableView
Posted by Roger Whitcomb <Ro...@rbwhitcomb.com>.
Very good.
~Roger
On Apr 4, 2012, at 10:58 AM, anton dos santos <ad...@free.fr> wrote:
> Hi Roger,
> it worked with following styles:
> styles="{horizontalAlignment:'center',verticalAlignment:'center'}"
>
> Thanks
> Anton
>
> On 04/04/2012 07:16, Roger and Beth Whitcomb wrote:
>> Hi Anton,
>> You would put in a BoxPane into your cellEditors with a
>> horizontalAlignment of 'center', then put the Checkbox inside the
>> BoxPane. Something like this:
>> <cellEditors>
>> <doneArLinks>
>> <BoxPane styles="{horizontalAlignment:'center'}">
>> <Checkbox selectedKey="doneArLinks"/>
>> </BoxPane>
>> </doneArLinks>
>> ...
>>
>> ~Roger Whitcomb
>>
>> On 4/3/12 2:30 PM, anton dos santos wrote:
>>> Hi
>>> in a TableView, TableViewBooleanCellRenderer is centered in its
>>> column, but a checkbox (as editor) is left aligned.
>>> I'd like to have the editors aligned to the renderers
>>> See attached picture where first row is edited and second row is
>>> not.
>>> I tried to change the style of the checkbox, but there is no
>>> horizontalAlignment style on Checkbox.
>>>
>>> my bxml code is :
>>> ....
>>> <TableView.Column name="doneArLinks" width="30"
>>> headerData="%doneArLinks" >
>>> <cellRenderer>
>>> <content:TableViewBooleanCellRenderer/>
>>> </cellRenderer>
>>> </columns>
>>> <rowEditor>
>>> <content:TableViewRowEditor editEffect="horizontal_slide">
>>> <cellEditors>
>>> <doneArLinks>
>>> <Checkbox selectedKey="doneArLinks" />
>>> </doneArLinks>
>>> ....
>>>
>>> How can I make my checkbox editors centered like the renderers ?
>>>
>>> Thanks
>>> Anton
>>
>>
>
>
Re: alignment of checkbox editor in TableView
Posted by anton dos santos <ad...@free.fr>.
Hi Roger,
it worked with following styles: styles="{horizontalAlignment:'center',verticalAlignment:'center'}"
Thanks
Anton
On 04/04/2012 07:16, Roger and Beth Whitcomb wrote:
> Hi Anton,
> You would put in a BoxPane into your cellEditors with a horizontalAlignment of 'center', then
> put the Checkbox inside the BoxPane. Something like this:
> <cellEditors>
> <doneArLinks>
> <BoxPane styles="{horizontalAlignment:'center'}">
> <Checkbox selectedKey="doneArLinks"/>
> </BoxPane>
> </doneArLinks>
> ...
>
> ~Roger Whitcomb
>
> On 4/3/12 2:30 PM, anton dos santos wrote:
>> Hi
>> in a TableView, TableViewBooleanCellRenderer is centered in its column, but a checkbox (as
>> editor) is left aligned.
>> I'd like to have the editors aligned to the renderers
>> See attached picture where first row is edited and second row is not.
>> I tried to change the style of the checkbox, but there is no horizontalAlignment style on Checkbox.
>>
>> my bxml code is :
>> ....
>> <TableView.Column name="doneArLinks" width="30" headerData="%doneArLinks" >
>> <cellRenderer>
>> <content:TableViewBooleanCellRenderer/>
>> </cellRenderer>
>> </columns>
>> <rowEditor>
>> <content:TableViewRowEditor editEffect="horizontal_slide">
>> <cellEditors>
>> <doneArLinks>
>> <Checkbox selectedKey="doneArLinks" />
>> </doneArLinks>
>> ....
>>
>> How can I make my checkbox editors centered like the renderers ?
>>
>> Thanks
>> Anton
>
>
Re: alignment of checkbox editor in TableView
Posted by Roger and Beth Whitcomb <Ro...@rbwhitcomb.com>.
Hi Anton,
You would put in a BoxPane into your cellEditors with a
horizontalAlignment of 'center', then put the Checkbox inside the
BoxPane. Something like this:
<cellEditors>
<doneArLinks>
<BoxPane styles="{horizontalAlignment:'center'}">
<Checkbox selectedKey="doneArLinks"/>
</BoxPane>
</doneArLinks>
...
~Roger Whitcomb
On 4/3/12 2:30 PM, anton dos santos wrote:
> Hi
> in a TableView, TableViewBooleanCellRenderer is centered in its
> column, but a checkbox (as editor) is left aligned.
> I'd like to have the editors aligned to the renderers
> See attached picture where first row is edited and second row is not.
> I tried to change the style of the checkbox, but there is no
> horizontalAlignment style on Checkbox.
>
> my bxml code is :
> ....
> <TableView.Column name="doneArLinks" width="30"
> headerData="%doneArLinks" >
> <cellRenderer>
> <content:TableViewBooleanCellRenderer/>
> </cellRenderer>
> </columns>
> <rowEditor>
> <content:TableViewRowEditor editEffect="horizontal_slide">
> <cellEditors>
> <doneArLinks>
> <Checkbox selectedKey="doneArLinks" />
> </doneArLinks>
> ....
>
> How can I make my checkbox editors centered like the renderers ?
>
> Thanks
> Anton