Vladimir Konrad
2008-Jan-29 12:30 UTC
[fxruby-users] FXTable: fitColumnsToContents() and fitRowsToContents()
Hello, I have a simple table where the cells are set using .setItemText() method (all cells are set). 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. I searched but obviously missing something... Vlad Please access the attached hyperlink for an important electronic communications disclaimer: http://www.lse.ac.uk/collections/secretariat/legal/disclaimer.htm
Lyle Johnson
2008-Jan-29 15:56 UTC
[fxruby-users] FXTable: fitColumnsToContents() and fitRowsToContents()
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.
Vladimir Konrad
2008-Jan-29 16:28 UTC
[fxruby-users] [solved] FXTable: fitColumnsToContents() and fitRowsToContents()
> Make sure that you''re calling those methods after the table (and > more importantly, the table items) has already been created.Thank you :-), I called the methods in window''s .initialize method (which does not work as window was not created/shown yet). Vlad Please access the attached hyperlink for an important electronic communications disclaimer: http://www.lse.ac.uk/collections/secretariat/legal/disclaimer.htm