Anyone know how to make table headers resizable in 1.2? Tried this: setRowHeaderMode(0) But it just made the header very narrow, and still not resizable. What I''d really like is for it to be resizable and start with a reasonable width, even if entries are empty.
Joel VanderWerf wrote:> > Anyone know how to make table headers resizable in 1.2? > > Tried this: > > setRowHeaderMode(0)Pass TABLE_COL_SIZEABLE as one of FXTable''s options. Jamey Confidentiality Notice: This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and/or privileged information. If you are not the intended recipient(s), you are hereby notified that any dissemination, unauthorized review, use, disclosure or distribution of this email and any materials contained in any attachments is prohibited. If you receive this message in error, or are not the intended recipient(s), please immediately notify the sender by email and destroy all copies of the original message, including attachments.
Jamey Cribbs wrote:> Joel VanderWerf wrote: > >> >> Anyone know how to make table headers resizable in 1.2? >> >> Tried this: >> >> setRowHeaderMode(0) > > > Pass TABLE_COL_SIZEABLE as one of FXTable''s options.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) The rows and columns are resizable, just not the headers. IOW, I get the resize cursor between pairs of col and row headers. But not when I hover the mouse along the lines separating header from body.
On Thu, 03 Mar 2005 12:27:56 -0800, Joel VanderWerf <vjoel@path.berkeley.edu> wrote :> The rows and columns are resizable, just not the headers. IOW, I get the > resize cursor between pairs of col and row headers. But not when I hover > the mouse along the lines separating header from body.I have not yet had an opportunity to look into this (still at work), but I wonder if it''s related at all to the problem described in this thread? http://rubyforge.org/pipermail/fxruby-users/2005-February/000187.html I think it''s probably a different issue -- there, David was wanting columns to *not* be resizeable. But your question reminded me of that discussion. Well, that was helpful. ;) Anyways, I''ll try to check it out tonight and see what''s up. Lyle
lyle@knology.net wrote:> On Thu, 03 Mar 2005 12:27:56 -0800, Joel VanderWerf > <vjoel@path.berkeley.edu> wrote : > > >>The rows and columns are resizable, just not the headers. IOW, I get the >>resize cursor between pairs of col and row headers. But not when I hover >>the mouse along the lines separating header from body. > > > I have not yet had an opportunity to look into this (still at work), but I > wonder if it''s related at all to the problem described in this thread? > > http://rubyforge.org/pipermail/fxruby-users/2005-February/000187.html > > I think it''s probably a different issue -- there, David was wanting columns > to *not* be resizeable. But your question reminded me of that discussion.They may be orthogonal issues. I do want the boundaries between header cells to be adjustable. But I also want the boundary between the row (not col) header widget and the table body to be movable. I''m fussy :)
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, Lyle
> > 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.
On Mar 3, 2005, at 11:01 PM, Joel VanderWerf wrote:> 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:Ah, OK.> 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.The light bulb just went on for me as to what you''re wanting to do, and I don''t think that FOX supports that. Looking at the FOX source code, it appears that the mouse motion handling when you''re clicking and dragging inside an FXHeader is constrained to one axis, depending on how the header is oriented. If it''s a horizontally-oriented header (like the column header), you can only interactively resize the widths of the different header items (but not their heights). If it''s a vertically-oriented header (like the table''s row header), you can only resize the heights of the header items (but not their widths).
Lyle Johnson wrote:> > On Mar 3, 2005, at 11:01 PM, Joel VanderWerf wrote: > >> 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: > > > Ah, OK. > >> 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. > > > The light bulb just went on for me as to what you''re wanting to do, and > I don''t think that FOX supports that. Looking at the FOX source code, it > appears that the mouse motion handling when you''re clicking and dragging > inside an FXHeader is constrained to one axis, depending on how the > header is oriented. If it''s a horizontally-oriented header (like the > column header), you can only interactively resize the widths of the > different header items (but not their heights). If it''s a > vertically-oriented header (like the table''s row header), you can only > resize the heights of the header items (but not their widths).Darn. I guess I''m remembering the 1.0 style leading rows. Jeroen, if you''re listening, is this(*) a feature that we can expect eventually? Not that it''s critical, but in my case users enter text that is used for the headers, and I''d like for them to be able to see as much of it as they want. (*) Mouse control of the boundary between header and body of a table.