[fxruby-users] Fixed column widths in FXTable?
Jeroen van der Zijp
jeroen at fox-toolkit.org
Fri Feb 18 17:18:13 EST 2005
On Friday 18 February 2005 03:56 pm, David Peoples wrote:
> Is there a way to make an FXTable's column widths (and row heights)
> unchangeable by the user? By experimentation it looks to me like leaving
> out TABLE_COL_SIZABLE and TABLE_ROW_SIZABLE from the options field in
> FXTable.new() has no effect. I can still drag the intersection between
> two column heading buttons to change the column width. The code I'm
> using to test this is below.
>
> The test is on a machine running Windows XP Home, service pack 2. The
> base Ruby installation is the "One Click Ruby Installer" version
> 1.8.2-14 final (ruby182-14.exe). I've installed FXRuby version 1.2.3 on
> top of the version included with the one click installer
> (FXRuby-1.2.3-ruby182.exe). fxversion() reports "1.2.13" from the irb
> command prompt. The machine has a Pentium 4 and 256mb ram.
>
> -------------------------------------------------------------------------
>
> require "fox12"
> include Fox
>
> class TestWindow < FXMainWindow
>
> def initialize(app)
> super(app, "MyTest", nil, nil, DECOR_ALL, 0, 0, 600, 400, 0, 0)
> table = FXTable.new(self, nil, 0, LAYOUT_FILL_X|LAYOUT_FILL_Y)
> table.setTableSize(50, 3)
> (0...50).each do |r|
> table.setItemText(r, 0, "#{r},0")
> table.setItemText(r, 1, "#{r},1")
> table.setItemText(r, 2, "#{r},2")
> end
> end
>
> def create
> super
> show(PLACEMENT_SCREEN)
> end
>
> end
>
> def runme
> application = FXApp.new("MyTest", "FoxTest")
> TestWindow.new(application)
> application.create
> application.run
> end
>
> runme
You are correct. I can't believe this was overlooked but I'm going to
make sure its fixed for the next 1.4 update [you'll get it soon when
the Ruby <-> FOX 1.4 binding gets out].
Since 1.4 has editable tables, I think you'll want to upgrade as soon
as possible.
Regards,
- Jeroen
More information about the fxruby-users
mailing list