[Fxruby-users] Frames not obeying width/height?
Status: Inactive
Brought to you by:
lyle
From: Carl Y. <ca...@yo...> - 2003-12-15 04:56:02
|
I'm having a problem getting my application to space things the way I want them. I basically have one horizontal frame that contains everything. Inside that I have left and right vertical frames. The left frame I want to contain an iconlist, and I want it take up most of the space. The right frame will contain a basic list with some buttons below it, and I only need it to be as wide as the widest item in the list. So I want it to be fairly narrow. The following code makes the right and left frames equal size, which scrunches the iconlist and gives way too much room to the right-hand list. However, when I try to remove the LAYOUT_FILL_X options from the right and left frames, the lists occupy the opposite edges and are very narrow, leaving a huge gap of nothing in the middle. I tried leaving the left frame set to LAYOUT_FILL_X and hard-coding the width of the right frame, but it seems to completely ignore my size settings and leave very little room for the right-hand frame. Any ideas? Thanks, Carl Here is the code: ---------------------------- contents = FXHorizontalFrame.new(self, LAYOUT_SIDE_TOP|LAYOUT_FILL_X|LAYOUT_FILL_Y, 0, 0, 0, 0, 0, 0, 0, 0) leftframe = FXVerticalFrame.new(contents, LAYOUT_FILL_Y|LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_FILL_X, 0, 0, 0, 0, 0, 0, 0, 0) FXLabel.new(leftpane, "Transactions", nil, LAYOUT_FILL_X) # Transaction view window transframe = FXVerticalFrame.new(leftframe, FRAME_SUNKEN|FRAME_THICK|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_TOP|LAYOUT_LEFT, 0, 0, 0, 0, 0, 0, 0, 0) FXVerticalSeparator.new(contents, SEPARATOR_RIDGE|LAYOUT_FILL_Y) rightframe = FXVerticalFrame.new(contents, LAYOUT_TOP|LAYOUT_RIGHT, 0, 0, 150, 200, 0, 0, 0, 0) FXLabel.new(rightframe, "Categories", nil, LAYOUT_FILL_X) catlistframe = FXVerticalFrame.new(rightframe, FRAME_SUNKEN|FRAME_THICK|LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_FILL_X, 0, 0, 0, 0, 0, 0, 0, 0) @catlist = FXList.new(catlistframe, 20, nil, 0, LAYOUT_FILL_X|LAYOUT_FILL_Y|LIST_SINGLESELECT) @catlist.appendItem("Text") @translist = FXIconList.new(transframe, nil, 0, LAYOUT_FILL_X|LAYOUT_FILL_Y|ICONLIST_BROWSESELECT) @translist.appendHeader("Date", nil, 75) @translist.appendHeader("Check", nil, 50) @translist.appendHeader("Amount", nil, 75) @translist.appendHeader("Payee", nil, 250) @translist.appendHeader("Category", nil, 150) @translist.appendHeader("Result", nil, 150) |