pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dirk Möbius <dmoeb...@scoop-gmbh.de>
Subject Re: ScrollPane with TreeView in BoxPane
Date Thu, 06 May 2010 07:05:36 GMT
Hello Weisswurst,

You cannot use the outer BoxPane in this case here. The BoxPane always  
grows as large as its enclosing component want to be. That is, the  
ScrollPane doesn't get constrained to the height of the window.

Instead you must use a TablePane, where you can declare a row to be as  
high as the container's remaining space, using height="1*". I rewrote  
your pastebin example and verified it works:

<Window maximized="true"
         xmlns:wtkx="http://pivot.apache.org/wtkx"
         xmlns:content="org.apache.pivot.wtk.content"
         xmlns:tools="org.apache.pivot.tools.wtk"
         xmlns:renderer.xml ="de.v7.utils"
         xmlns="org.apache.pivot.wtk">
     <content>
         <TablePane wtkx:id="tablePane" styles="{padding:4}">
             <columns>
                 <TablePane.Column width="1*"/>
             </columns>
             <rows>
                 <TablePane.Row height="-1">
                     <FlowPane wtkx:id="flowPane" styles="{padding:4}">
                         <Label text="Id:"/>
                         <TextInput wtkx:id="searchTerm"/>
                         <PushButton wtkx:id="pushButton"  
buttonData="Search!"/>
                     </FlowPane>
                 </TablePane.Row>
                 <TablePane.Row height="1*">
                     <ScrollPane verticalScrollBarPolicy="fill_to_capacity">
                         <view>
                             <TreeView wtkx:id="treeView">
                                 <nodeRenderer>
                                   <!--<tools.xml:NodeRenderer/>-->
	                          <renderer.xml:NodeRenderer/>
                                 </nodeRenderer>
                             </TreeView>
                         </view>
                     </ScrollPane>
                 </TablePane.Row>
             </rows>
         </TablePane>
     </content>
</Window>

Regards,
Dirk.


weisswurst@gmx.net wrote:

> The last changes didn't help too.
>
> I have pasted the complete wtkx here:
>
> http://paste.ubuntuusers.de/398218/
>
> And a screenshot here:
>
> http://www.img-host.de/bild.php/37098,tvAHQQ4.png
>
> I'm pretty shure it has something to do with the fact, that the tree fits
> perfectly well into the window if it's not expanded.
>
> Do I have to use values for preferred width and height in TreeView  
> and Window  and ScrollPane to have this work?
>
> Thank you very much for your help!
>
> --
> GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
> Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
>



-- 
Dirk Möbius

SCOOP GmbH
Am Kielshof 29
D-51105 Köln
Fon   +49 221 801916-0
Fax   +49 221 801916-17
Mobil +49 170 7363035
www.scoop-gmbh.de
Sitz der Gesellschaft: Köln
Handelsregister: Köln
Handelsregisternummer: HRB 36623
Geschäftsführer:
Dr. Oleg Balovnev
Frank Heinen
Dr. Wolfgang Reddig
Roland Scheel



Mime
View raw message