[fxruby-users] resizable table headers
Joel VanderWerf
vjoel at PATH.Berkeley.EDU
Fri Mar 4 00:01:10 EST 2005
>
> On Mar 3, 2005, at 2:27 PM, Joel VanderWerf wrote:
>
>> I'm already doing that:
>>
>> super(inner_frame, 0, 0, nil, 0,
>> TABLE_COL_SIZABLE|TABLE_ROW_SIZABLE|LAYOUT_FILL_X|LAYOUT_FILL_Y,
>> 0,0,0,0, 2,2,2,2)
>
> Ah, I see it. You're still passing the visibleRows and visibleColumns
> arguments (the 2nd and 3rd arguments) to FXTable.new. Those two got
> dropped for FXRuby 1.2. Try this instead:
>
> super(inner_frame, nil, 0,
> TABLE_COL_SIZABLE|TABLE_ROW_SIZABLE|LAYOUT_FILL_X|LAYOUT_FILL_Y,
> 0,0,0,0, 2,2,2,2)
>
> Hope this helps,
Oops--I neglected to tell you about (or remember for that matter) that I
had a "shim" file that I could use so that code would run on both 1.0 and
1.2. In that file I was defining:
class FXTable
alias new_1_2_api_initialize initialize
def initialize(*args, &block)
dim = args.slice!(1..2)
new_1_2_api_initialize(*args, &block)
setTableSize(*dim)
end
alias numCols numColumns
end
So I don't think those two zeros were the problem.
But, for me at least, the standard table.rb example has the same problem
(can't change size of headers) and it uses
@table = FXTable.new(frame, nil, 0,
TABLE_COL_SIZABLE|TABLE_ROW_SIZABLE|LAYOUT_FILL_X|LAYOUT_FILL_Y,
0,0,0,0, 2,2,2,2)
Even adding
@table.setRowHeaderMode(0)
doesn't help.
More information about the fxruby-users
mailing list