You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by dhaval vyas <dh...@gmail.com> on 2010/11/09 23:25:20 UTC
Getting listview to fill the space.
Hello, I am trying to make the listview to fill all the available space. I
can make it to fill all the available horizontal space, but it doesn't fill
the vertical space. can someone guide me it right direction.
CODE:
<BoxPane
xmlns:wtkx="http://pivot.apache.org/wtkx" xmlns="org.apache.pivot.wtk"
orientation="vertical" preferredWidth="10" styles="{fill:true}">
<Label text="Issues" />
<Separator />
<ScrollPane minimumPreferredWidth="80" minimumPreferredHeight="10"
horizontalScrollBarPolicy="fill_to_capacity"
verticalScrollBarPolicy="fill_to_capacity">
<view>
<ListView wtkx:id="issueListView" selectMode="single"
listData="['One', 'Two', 'really really long three XXXXXXX
Three ', 'Four', 'Five',
'Six', 'Seven', 'Eight', 'Nine',
'Ten']" />
</view>
</ScrollPane>
</BoxPane>
Thanks,
--
Dhaval Vyas
Re: Getting listview to fill the space.
Posted by Kamil Toszek <ka...@gmail.com>.
No problem, I had the same issue before (if you look at my previous posts),
that's why I was able to help you.
I think this behavior is designed to be so. If I'm correct TablePane takes
all the available space in it's parent container (so you can say "1*" for
columns and rows), where BoxPane takes only as mach as needed and stretches
itself only in one direction if you tell him to do so (fill style).
2010/11/10 dhaval vyas <dh...@gmail.com>
> yes, Thanks,
> it work if I wrap a TablePane around instead of BoxPane. is this a bug or
> this is how BoxPane suppose to work?
>
> My final code (just in case someone wants to see)
>
>
>
> <TablePane xmlns:wtkx="http://pivot.apache.org/wtkx"
> xmlns="org.apache.pivot.wtk"
> styles="{VerticalSpacing:5} ">
> <columns>
> <TablePane.Column width="1*" />
> </columns>
> <rows>
> <TablePane.Row height="1*">
> <Border>
> <content>
>
> <Label text="Issues" />
> <Separator />
> <ScrollPane minimumPreferredWidth="80"
> minimumPreferredHeight="80"
> horizontalScrollBarPolicy="fill_to_capacity"
> verticalScrollBarPolicy="fill_to_capacity">
> <view>
> <ListView wtkx:id="issueListView"
> selectMode="single"
> listData="['One', 'Two', 'Three lsadkfj
> alkdsj alskdjlaksdj alksdj', 'Four', 'Five',
>
> 'Six', 'Seven', 'Eight',
> 'Nine', 'Ten']" />
> </view>
> </ScrollPane>
> </content>
> </Border>
> </TablePane.Row>
> </rows>
> </TablePane>
>
>
>
>
> On Tue, Nov 9, 2010 at 5:37 PM, Kamil Toszek <ka...@gmail.com>wrote:
>
>> Hi,
>> I think using TablePane instead of BoxPane will solve your problem.
>>
>>
>>
>> 2010/11/9 dhaval vyas <dh...@gmail.com>
>>
>>
>>> Hello, I am trying to make the listview to fill all the available space.
>>> I can make it to fill all the available horizontal space, but it doesn't
>>> fill the vertical space. can someone guide me it right direction.
>>>
>>> CODE:
>>>
>>>
>>> <BoxPane
>>> xmlns:wtkx="http://pivot.apache.org/wtkx"
>>> xmlns="org.apache.pivot.wtk"
>>> orientation="vertical" preferredWidth="10" styles="{fill:true}">
>>> <Label text="Issues" />
>>> <Separator />
>>> <ScrollPane minimumPreferredWidth="80" minimumPreferredHeight="10"
>>> horizontalScrollBarPolicy="fill_to_capacity"
>>> verticalScrollBarPolicy="fill_to_capacity">
>>> <view>
>>> <ListView wtkx:id="issueListView" selectMode="single"
>>> listData="['One', 'Two', 'really really long three
>>> XXXXXXX Three ', 'Four', 'Five',
>>> 'Six', 'Seven', 'Eight',
>>> 'Nine', 'Ten']" />
>>> </view>
>>> </ScrollPane>
>>>
>>> </BoxPane>
>>>
>>>
>>> Thanks,
>>> --
>>> Dhaval Vyas
>>>
>>>
>>
Re: Getting listview to fill the space.
Posted by dhaval vyas <dh...@gmail.com>.
yes, Thanks,
it work if I wrap a TablePane around instead of BoxPane. is this a bug or
this is how BoxPane suppose to work?
My final code (just in case someone wants to see)
<TablePane xmlns:wtkx="http://pivot.apache.org/wtkx"
xmlns="org.apache.pivot.wtk"
styles="{VerticalSpacing:5} ">
<columns>
<TablePane.Column width="1*" />
</columns>
<rows>
<TablePane.Row height="1*">
<Border>
<content>
<Label text="Issues" />
<Separator />
<ScrollPane minimumPreferredWidth="80"
minimumPreferredHeight="80"
horizontalScrollBarPolicy="fill_to_capacity"
verticalScrollBarPolicy="fill_to_capacity">
<view>
<ListView wtkx:id="issueListView"
selectMode="single"
listData="['One', 'Two', 'Three lsadkfj
alkdsj alskdjlaksdj alksdj', 'Four', 'Five',
'Six', 'Seven', 'Eight', 'Nine',
'Ten']" />
</view>
</ScrollPane>
</content>
</Border>
</TablePane.Row>
</rows>
</TablePane>
On Tue, Nov 9, 2010 at 5:37 PM, Kamil Toszek <ka...@gmail.com> wrote:
> Hi,
> I think using TablePane instead of BoxPane will solve your problem.
>
>
>
> 2010/11/9 dhaval vyas <dh...@gmail.com>
>
>
>> Hello, I am trying to make the listview to fill all the available space.
>> I can make it to fill all the available horizontal space, but it doesn't
>> fill the vertical space. can someone guide me it right direction.
>>
>> CODE:
>>
>>
>> <BoxPane
>> xmlns:wtkx="http://pivot.apache.org/wtkx"
>> xmlns="org.apache.pivot.wtk"
>> orientation="vertical" preferredWidth="10" styles="{fill:true}">
>> <Label text="Issues" />
>> <Separator />
>> <ScrollPane minimumPreferredWidth="80" minimumPreferredHeight="10"
>> horizontalScrollBarPolicy="fill_to_capacity"
>> verticalScrollBarPolicy="fill_to_capacity">
>> <view>
>> <ListView wtkx:id="issueListView" selectMode="single"
>> listData="['One', 'Two', 'really really long three XXXXXXX
>> Three ', 'Four', 'Five',
>> 'Six', 'Seven', 'Eight',
>> 'Nine', 'Ten']" />
>> </view>
>> </ScrollPane>
>>
>> </BoxPane>
>>
>>
>> Thanks,
>> --
>> Dhaval Vyas
>>
>>
>
Re: Getting listview to fill the space.
Posted by Kamil Toszek <ka...@gmail.com>.
Hi,
I think using TablePane instead of BoxPane will solve your problem.
2010/11/9 dhaval vyas <dh...@gmail.com>
>
> Hello, I am trying to make the listview to fill all the available space. I
> can make it to fill all the available horizontal space, but it doesn't fill
> the vertical space. can someone guide me it right direction.
>
> CODE:
>
>
> <BoxPane
> xmlns:wtkx="http://pivot.apache.org/wtkx" xmlns="org.apache.pivot.wtk"
> orientation="vertical" preferredWidth="10" styles="{fill:true}">
> <Label text="Issues" />
> <Separator />
> <ScrollPane minimumPreferredWidth="80" minimumPreferredHeight="10"
> horizontalScrollBarPolicy="fill_to_capacity"
> verticalScrollBarPolicy="fill_to_capacity">
> <view>
> <ListView wtkx:id="issueListView" selectMode="single"
> listData="['One', 'Two', 'really really long three XXXXXXX
> Three ', 'Four', 'Five',
> 'Six', 'Seven', 'Eight',
> 'Nine', 'Ten']" />
> </view>
> </ScrollPane>
>
> </BoxPane>
>
>
> Thanks,
> --
> Dhaval Vyas
>
>