Re: [Fxruby-users] layout probs with TreeList.
Status: Inactive
Brought to you by:
lyle
From: Lyle J. <jl...@cf...> - 2003-07-16 14:06:19
|
Hugh Sasse Staff Elec Eng wrote: > I find that the TreeList only takes up half the space of contents, > the lower pane, and that it is too narrow. LAYOUT_FILL_X is not > doing what I expected in this regard. Have I missed some layout > facilities? Also the right hand half of contents is blank, despite > there being nothing in it: I thought it would expand to fit its > contents, which in this case would be not expand at all. This is just based on a quick scan of the code, but see what (if anything) happens if you make these changes: First, remove the LAYOUT_FILL_X from the dialog box's constructor options. I don't guess it's hurting anything, but it's being ignored; a dialog box is a top-level window and thus doesn't have a parent container to stretch out in: super(parent, "Category Dialogue", DECOR_TITLE|DECOR_BORDER) Next, change the layout hints for the contents frame so that it stretches in both the x and y directions: contents = FXHorizontalFrame.new(self, LAYOUT_FILL_X|LAYOUT_FILL_Y) Similarly, change the layout hints on the tree list so that it stretches in both the x and y directions: @treeview[""].listStyle |= (TREELIST_SHOWS_LINES | TREELIST_SHOWS_BOXES | TREELIST_ROOT_BOXES| LAYOUT_FILL_X|LAYOUT_FILL_Y) By telling these two widgets to (additionally) stretch to fill up the remaining space in the y-direction, you shouldn't see any wasted space, vertically speaking. Now as for your comment about the right-hand side of contents being blank: is it drawn with a white background? If so, that is just the tree list stretching to fill in the x-direction. But it doesn't "stretch" the tree items, if that's what you're asking. In other words, the tree items' text is going to be drawn in whatever the current text font is for that tree list. Hope this helps; please follow up if this doesn't cover it. Lyle Lyle |