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
-------------------------------------------------------------------------
--
David Peoples davidp@touringcyclist.com
The Touring Cyclist http://www.touringcyclist.com
11816 St. Charles Rock Road, Bridgeton, MO 63044
tel: 314-739-4648 fax: 314-739-4972
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 > > runmeYou 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
On Feb 18, 2005, at 4:18 PM, Jeroen van der Zijp wrote:> 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 an FXRuby 1.4 may still be some ways off, do you plan to back-port this fix to FOX 1.2? The correct answer is, "Yes, and real soon now." ;)