On Fri, 22 Oct 2004 19:24:25 -0700, Bob Sidebotham <bob@windsong.bc.ca> wrote:> Some random questions that came up while trying to use the table object: > > 1. In the 1.2 api, a row header of type FXHeader is shown as a read-only > attribute of an FXTable. How do I associate the header and the > table--there doesn''t appear to be any method to do this, nor a parameter > in the constructor.The table constructs and "owns" the row and columns headers. You don''t have to create an FXHeader separately and associate it with the table.> 2. What do the w, h parameters to the constructor do? They don''t seem to > do anything for me...These specify the table widget''s width and height in pixels, if you''ve specified the LAYOUT_FIX_WIDTH and LAYOUT_FIX_HEIGHT layout options. Note that this is different from the table size in terms of rows and columns, which make take up less space onscreen than the allocated width and height.> 3. setItemJustify is missing from the docYes, it looks like a number of methods aren''t documented. I''ll amend the existing bug report to indicate that FXTable really needs a comprehensive review in terms of the API documentation.> 4. leadingCols (leadingColumns?) and leadingRows are not there (at > least, not the assignment methods). I''m assuming (without a lot of > evidence), that if I want to create a table with an FXHeader, that I > would set leadingCols and leadingRows to zero (I''m thinking that they''re > currently defaulting to 1?), to remove the extra blank row/column title > elements, and replace them (somehow) with the FXHeader (I want to be > able to dynamically specify sorting order on each column).I don''t have an immediate answer for this one; let me research it and get back to you.> 5. Setting cellBorderWidth for the table doesn''t seem to have any effect.A few things to check: 1. Are the horizontal and vertical grid lines turned on? (By default, they should be). 2. Are the cell(s) border styles such that at least one of the borders should be drawn? By default, they aren''t, and you may need to do something like: table.setItemBorders(r, c, FXTableItem::LBORDER | FXTableItem::TBORDER) Hope this helps, Lyle
On Saturday 23 October 2004 02:20 pm, Lyle Johnson wrote:> On Fri, 22 Oct 2004 19:24:25 -0700, Bob Sidebotham <bob@windsong.bc.ca> wrote: > > Some random questions that came up while trying to use the table object: > > > > 1. In the 1.2 api, a row header of type FXHeader is shown as a read-only > > attribute of an FXTable. How do I associate the header and the > > table--there doesn''t appear to be any method to do this, nor a parameter > > in the constructor. > > The table constructs and "owns" the row and columns headers. You don''t > have to create an FXHeader separately and associate it with the table. > > > 2. What do the w, h parameters to the constructor do? They don''t seem to > > do anything for me... > > These specify the table widget''s width and height in pixels, if you''ve > specified the LAYOUT_FIX_WIDTH and LAYOUT_FIX_HEIGHT layout options. > Note that this is different from the table size in terms of rows and > columns, which make take up less space onscreen than the allocated > width and height.This is correct; to expand upon Lyle''s anwer, you can also set the number of visible rows and columns, that is to say, you can make FXTable report a size (from getDefaultWidth and getDefaultHeight) that is a multiple of the height/width of a row/column.> > 3. setItemJustify is missing from the doc > > Yes, it looks like a number of methods aren''t documented. I''ll amend > the existing bug report to indicate that FXTable really needs a > comprehensive review in terms of the API documentation. > > > 4. leadingCols (leadingColumns?) and leadingRows are not there (at > > least, not the assignment methods). I''m assuming (without a lot of > > evidence), that if I want to create a table with an FXHeader, that I > > would set leadingCols and leadingRows to zero (I''m thinking that they''re > > currently defaulting to 1?), to remove the extra blank row/column title > > elements, and replace them (somehow) with the FXHeader (I want to be > > able to dynamically specify sorting order on each column). > > I don''t have an immediate answer for this one; let me research it and > get back to you.leadingCols and leadingRows is a concept from the FOX 1.0 table; the new FXTable has header controls instead. This is a good thing as it allows one to slap widgets on cells and scroll them around [which, as a matter of fact, I''m in the process of adding right now...] - Jeroen -- +----------------------------------------------------------------------------+ | Copyright (C) 21:00 10/23/2004 Jeroen van der Zijp. All Rights Reserved. | +----------------------------------------------------------------------------+