Lyle:
I have tried your suggested replacement for fitColumnsToContents. While
it is better than the "standard" version, it does not completely cure my
problem. It does not get a large enough value for the width of the
heading text, and so far I have not determined why. I found that if I
increase this size estimate by 1/3 then the display looks about right.
That is, the line that determines "hw" is now:
hw = columnHeader.font.getTextWidth(columnHeader.getItemText(c))*4/3
However, this is a somewhat arbitrary solution to the problem, I am hoping
someone knows why the call to font.getTextWidth does not return an
adequate value.
The font I am using for the cell headers is:
@tahoma10Bold = FXFont.new(app, "Tahoma", 10, FXFont::Bold)
The font for the table contents is:
@courierNew10 = FXFont.new(app, "Courier New", 10) # 10 point, fixed
width
Thanks
Dave
____________________________________________________________
David C. Toll, Research Staff Member, Secure Systems and Smart Cards
IBM T. J. Watson Research Center, 19 Skyline Drive, Hawthorne NY 10532
Phone: 914-784-7019 (t/l 863) Fax: 914-784-6205 (t/l 863) email:
toll at us.ibm.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/fxruby-users/attachments/20080519/4d18dca0/attachment.html>