[fxruby-users] Re: FXTable questions

jeroen jeroen at fox-toolkit.org
Sat Oct 23 23:15:20 EDT 2004

On Saturday 23 October 2004 02:20 pm, Lyle Johnson wrote:
> 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.

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

More information about the fxruby-users mailing list