[fxruby-users] FXTable: fitColumnsToContents() and fitRowsToContents()

Lyle Johnson lyle at lylejohnson.name
Tue Jan 29 10:56:57 EST 2008

On Jan 29, 2008, at 6:30 AM, Vladimir Konrad wrote:

> I am trying to re-size the height and width of all cells so the  
> content
> of all cells is fully wisible. When I do:
> @table.fitColumnsToContents(0, @table.numColumns)
> @table.fitRowsToContents(0, @table.numRows)
> the cells shrink to their minimal size (smaller then default without
> calling .fitColumns/RowsToContents() method.

Make sure that you're calling those methods after the table (and more  
importantly, the table items) has already been created. Before the  
table has been created, it doesn't know the font size and therefore  
doesn't actually know how wide/tall the cells should be.

More information about the fxruby-users mailing list