[fxruby-users] Re: FXTable questions

Lyle Johnson lyle.johnson at gmail.com
Sat Oct 23 15:20:32 EDT 2004

On Fri, 22 Oct 2004 19:24:25 -0700, Bob Sidebotham <bob at 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 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.

> 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,


More information about the fxruby-users mailing list