pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Brown <gkbr...@mac.com>
Subject Re: ScrollPane not scrolling
Date Mon, 24 Aug 2009 23:43:42 GMT
A list view's preferred height is always the height of its contents. A  
scroll pane's preferred height is always the height of its view (and  
column header, when present), which, in this case, is the list view.  
It is only when a scroll pane is *not* given its preferred height that  
you will see a scroll bar, because scroll panes introduce scroll bars  
when the size of the viewport is smaller than the preferred size of  
the view.

So, it is really the scroll pane's parent that dictates when scrolling  
will occur, since the scroll pane's parent is what ultimately  
determines the size of the scroll pane.


On Aug 24, 2009, at 5:17 PM, Scott Lanham wrote:

> Thanks Greg,
>
> That solves my problem as I want the list box to fill the entire  
> height but I
> am curious about how to keep the lists height being determined from  
> it's
> contents but it also scrolling when it runs out of vertical space.
>
> On Mon, 24 Aug 2009 11:12:18 pm Greg Brown wrote:
>> The problem is that your scroll pane is a descendant of a vertical  
>> box
>> pane:
>>
>> <TablePane.Row height="1*">
>>    <BoxPane orientation="vertical">
>>        <styles fill="true"/>
>>        <Border title="Test List" minimumPreferredWidth="100">
>>            <content>
>>                <ScrollPane>
>>                    <view>
>>                        <ListView listData="['Test1', 'Test2',  
>> 'Test3',
>> 'Test4', 'Test5', 'Test6', 'Test7', 'Test8', 'Test9', 'Test10']"/>  
>> </view>
>>                </ScrollPane>
>>            </content>
>>        </Border>
>>    </BoxPane>
>> </TablePane.Row>
>>
>> Vertical box panes lay out vertically, but fill horizontally - so,  
>> one way
>> to fix this would be to use a horizontal box pane, which fills  
>> vertically.
>> Another would be to simply eliminate the box pane altogether and  
>> make the
>> Border the table cell. Visually, these will produce the same result.
>>
>> If you don't want your ListView to grow to fill the window height,  
>> you
>> could give the Border a maximum preferred height:
>>
>> <TablePane.Row height="1*">
>>    <BoxPane>
>>        <Border title="Test List" minimumPreferredWidth="100"
>> maximumPreferredHeight="150"> <content>
>>                <ScrollPane>
>>                    <view>
>>                        <ListView listData="['Test1', 'Test2',  
>> 'Test3',
>> 'Test4', 'Test5', 'Test6', 'Test7', 'Test8', 'Test9', 'Test10']"/>  
>> </view>
>>                </ScrollPane>
>>            </content>
>>        </Border>
>>    </BoxPane>
>> </TablePane.Row>
>>
>> Hope this helps.
>> G
>>
>> On Sunday, August 23, 2009, at 08:15PM, "Scott Lanham" <lists@sael.com.au 
>> >
> wrote:
>>> Hello,
>>>
>>> Attached is an example wtkx file. If I grab the bottom of the  
>>> window and
>>> squash it until it covers part of the list the ScrollPane doesn't  
>>> produce
>>> a scrollbar. Is there any way I can get the ScrollPane to scroll?
>>>
>>> Thanks,
>>>
>>> Scott.
>


Mime
View raw message