pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kamil Toszek <kamil.tos...@gmail.com>
Subject Re: ScrollPane problem
Date Wed, 08 Sep 2010 18:05:29 GMT
ok swiching from BoxPane to TablePane did the trick :-)

regards
Kamil Toszek



W dniu 8 września 2010 19:42 użytkownik Kamil Toszek <kamil.toszek@gmail.com
> napisał:

> Hi.
> I have problem with layout I'm fighting with and don't have a clue how to
> solve it.
>
> if I put TableView inside ScrollPane and this inside TabPane, everything
> works fine, if content of the TableView is bigger than view then scrollbar
> is showing up. BUT if i have something like this:
> TabPane->BoxPane->ScrollPane->TableView then ScrollPane never shows
> scrollbar even if content of the TableView is clipped.
>
>
> Here is my not working wtkx file (inluded directly into tabPane's tab):
>
> <BoxPane xmlns:wtkx="http://pivot.apache.org/wtkx"
>     xmlns="org.apache.pivot.wtk"
>     xmlns:content="org.apache.pivot.wtk.content"
>     orientation="vertical" styles="{fill:true}">
>     <FlowPane wtkx:id="flowPane" styles="{padding:5}">
>         <Label text="Grupa"/>
>         <ListButton wtkx:id="stockGroupListButton"
> listData="['WIG20','Indeksy']" selectedIndex="0"/>
>     </FlowPane>
>     <ScrollPane horizontalScrollBarPolicy="fill_to_capacity"
> verticalScrollBarPolicy="fill_to_capacity">
>         <view>
>             <TableView wtkx:id="stockTableView" >
>                 <columns>
>                     <TableView.Column name="symbol" width="100"
> headerData="Symbol"/>
>                     <TableView.Column name="group" width="100"
> headerData="Grupa"/>
>                     <TableView.Column name="date" width="100"
> headerData="Data">
>                         <cellRenderer>
>                             <content:TableViewDateCellRenderer>
>                                 <dateFormat>dd.MM.yyyy</dateFormat>
>                             </content:TableViewDateCellRenderer>
>                         </cellRenderer>
>                     </TableView.Column>
>                     <TableView.Column name="open" width="100"
> headerData="Otwarcie">
>                         <cellRenderer>
>                             <content:TableViewNumberCellRenderer>
>                                 <numberFormat>#0.00</numberFormat>
>                             </content:TableViewNumberCellRenderer>
>                         </cellRenderer>
>                     </TableView.Column>
>                     <TableView.Column name="low" width="100"
> headerData="Minimum">
>                         <cellRenderer>
>                             <content:TableViewNumberCellRenderer>
>                                 <numberFormat>#0.00</numberFormat>
>                             </content:TableViewNumberCellRenderer>
>                         </cellRenderer>
>                     </TableView.Column>
>                     <TableView.Column name="high" width="100"
> headerData="Maksimum">
>                         <cellRenderer>
>                             <content:TableViewNumberCellRenderer>
>                                 <numberFormat>#0.00</numberFormat>
>                             </content:TableViewNumberCellRenderer>
>                         </cellRenderer>
>                     </TableView.Column>
>                     <TableView.Column name="close" width="100"
> headerData="Zamknięcie">
>                         <cellRenderer>
>                             <content:TableViewNumberCellRenderer>
>                                 <numberFormat>#0.00</numberFormat>
>                             </content:TableViewNumberCellRenderer>
>                         </cellRenderer>
>                     </TableView.Column>
>                     <TableView.Column name="volume" width="100"
> headerData="Wolumen">
>                         <cellRenderer>
>                             <content:TableViewNumberCellRenderer>
>                                 <numberFormat>#0</numberFormat>
>                             </content:TableViewNumberCellRenderer>
>                         </cellRenderer>
>                     </TableView.Column>
>                 </columns>
>                 <tableViewSortListeners>
>                     <wtkx:script>
>                                 function sortChanged(tableView) {
>                                     var tableData =
> tableView.getTableData();
>                                     tableData.setComparator(new
> org.apache.pivot.wtk.content.TableViewRowComparator(tableView));
>                                 }
>                     </wtkx:script>
>                 </tableViewSortListeners>
>             </TableView>
>         </view>
>         <columnHeader>
>             <TableViewHeader tableView="$stockTableView"
> sortMode="single_column"/>
>         </columnHeader>
>     </ScrollPane>
> </BoxPane>
>
>

Mime
View raw message