[Fxruby-users] layout probs with TreeList.
Status: Inactive
Brought to you by:
lyle
|
From: Hugh S. S. E. E. <hg...@dm...> - 2003-07-16 11:08:39
|
I have an FXDialog window with a treelist created like this:
class CategoryDialog < FXDialogBox
CATEGORIES = :CATEGORIES
ITEMS = :ITEMS
BOTH = :BOTH
def initialize(parent, edit=CATEGORIES)
super(parent, "Category Dialogue",DECOR_TITLE|DECOR_BORDER|LAYOUT_FILL_X)
puts "called FXDialogBox.initialize"
menubar = FXMenubar.new(self)
filemenu = FXMenuPane.new(self)
FXMenuCommand.new(filemenu, "&Quit", nil, getApp(), FXApp::ID_QUIT, 0)
FXMenuTitle.new(menubar, "&File", nil, filemenu)
FXHorizontalSeparator.new(self)
# Contents
contents = FXHorizontalFrame.new(self, LAYOUT_FILL_X )
@treeview = Hash.new()
@treeview[""] = FXTreeList.new(contents, 10)
@treeview[""].listStyle |= TREELIST_SHOWS_LINES | TREELIST_SHOWS_BOXES | TREELIST_ROOT_BOXES|LAYOUT_FILL_X
@treeview["equipment"] =
@treeview[""].addItemLast(nil,
"equipment",nil, # openIcon
nil, # closedIcon
TreeData.new(@treeview[""], "#{$equipdir}" ) # data
)
end
#...
end
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.
Hugh
|