Hi Albert, >Attached goes a zipped sample that exhibits the behaviour I was >describing... When you open the "level1" node in the LEFT tree >pane, then switch tabs (from "Test 1" to "Test 2" and back to >"Test 1"), you will see that the left box has changed it's width >and that the horizontal scroll bar is gone.
You have two boxpanes, left and right which have been included in another boxpane. The constraint for both boxes is EXPAND_EXPAND - i.e. they will expand as much as possible vertically and horizontally to display their content. Now when you expand the tree node with long text, the first time round, the scroll bar appears. This is because both the boxes have been laid in the outer box taking equal space and the left box cannot expand because the right box is occupying some space. When you change tab and return, the boxes are painted again. This time the left box expands to accomodate the long text of tree and the scroll bar disappears, the right box shrinks because it does not need as much space to show its content. Suppose you had, expanded trees in both left and right node, and changed tab and returned, you would see that the scrollbars are retained because the left box cannot push the right box to the left as the right box needs space to display its content. What you can do is to set preferred size on the left box so that it will remain constant and display the scroll bar on tab change. Or you can use ULCFillers to make your layout rigid/flexible as you wish. I hope this helps. Thanks and regards, Janak >-----Original Message----- >From: Albert Smulders [mailto:[EMAIL PROTECTED] >Sent: Thursday, August 24, 2006 2:47 PM >To: Janak Mulani >Subject: Re: RE: [ULC-developer] Annoying resizing behaviour ULCTree on >ULCTabbedPane > > >Hi Janak, > >Attached goes a zipped sample that exhibits the behaviour I was >describing... When you open the "level1" node in the LEFT tree >pane, then switch tabs (from "Test 1" to "Test 2" and back to >"Test 1"), you will see that the left box has changed it's width >and that the horizontal scroll bar is gone. > >Very strange: If the text in the leaf node is very long (commented >out in my code in TestPane1.java), this behaviour is not observed anymore! > >It would be nice if there were a workaround this problem... > >Kind regards, > >Alberto A.Smulders >HostDat Lda. - Portugal > >-------- Original-Nachricht -------- >Datum: Thu, 24 Aug 2006 11:30:37 +0530 >Von: "Janak Mulani" <[EMAIL PROTECTED]> >An: "Albert Smulders" <[EMAIL PROTECTED]> >Betreff: RE: [ULC-developer] Annoying resizing behaviour ULCTree >on ULCTabbedPane > >> Hi Albert, >> >> It really depends on what other components do you have in the tab besides >> the tree, how you have laid them, and also if you are using the lazy >> loading >> feature of the tab pane. >> >> >From what you have described it is hard to figure out what is going on. >> >> Could you please provide a small snippet? >> >> Thanks and regards, >> >> Janak >> >> >-----Original Message----- >> >From: [EMAIL PROTECTED] >> >[mailto:[EMAIL PROTECTED] Behalf Of Albert Smulders >> >Sent: Tuesday, August 22, 2006 3:33 PM >> >To: [EMAIL PROTECTED] >> >Subject: [ULC-developer] Annoying resizing behaviour ULCTree on >> >ULCTabbedPane >> > >> > >> >Hi to all, >> > >> >I have an ULCTabbedPane with ULCTree items on one of the tabs >> >(inside an ULCBoxPane). >> >When I open nodes in the tree, there appears correctly a >> >horizontal scroll bar if necessary (see fig_1). >> >But when I switch tabs on the tabbedpane and return to the pane >> >with the UCLTree items, the ULCTree is resized and the horizontal >> >scroll bar is gone (fig_2). >> > >> >I tried about everything to prevent this, but even setting a >> >maximum size on the tree or the scroll pane in which the tree is >> >embedded doesn't help, always when switching panes the tree is >> >resized and the scroll bar is gone! Also playing with the >> >Alignment property (setting it to BOX_LEFT_EXPAND instead of >> >BOX_EXPAND_EXPAND) of the scroll pane doesn't help at all! Always >> >my layout is messed up after switching panes... >> > >> >Somebody already experienced this annoying behaviour and found a >> >way around it? >> > >> >Kind regards, >> > >> >Alberto A.Smulders >> >HostDat Lda. - Portugal >> > >> > >> >-- >> > >> > >> >Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! >> >Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer >> > > >-- > > >"Feel free" – 10 GB Mailbox, 100 FreeSMS/Monat ... >Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail > _______________________________________________ ULC-developer mailing list [email protected] http://lists.canoo.com/mailman/listinfo/ulc-developer
