Daniel Sperl wrote:
I just tried to justify a text in a FXTableItem of a FXTable, but I seem
to be doing something wrong with the justification modes.
I tried the following:
@table.getItem(10, 10).justify = JUSTIFY_TOP
But the text stays unchanged. On the other hand, when I use JUSTIFY_LEFT
instead, it is justified at top of the cell.
I suppose I am using the wrong constants? Which constants are used to
achieve a correct justification?
When you have a question like this, a good place start is the API
documentation at the FXRuby Home Page:
http://www.fxruby.org
For example, if you check the documentation for FXTableItem:
http://www.fxruby.org/doc/api/classes/Fox/FXTableItem.html
you’ll see that for the “justify” attribute, an appropriate value is
some combination of the values LEFT/RIGHT and TOP/BOTTOM. So this:
@table.getItem(10, 10).justify = FXTableItem::TOP
should give text that is centered horizontally, and aligned against the
top edge of the cell. If you instead wanted, say, text aligned against
the bottom right corner you might use:
tableItem.justify = FXTableItem::BOTTOM | FXTableItem::RIGHT
– by the way: Is there a FXRuby-Newsgroup as well, or is this the
correct place for this message, anyway?
Also listed on the FXRuby Home Page is information about the
fxruby-users mailing list, which is probably a better place for
FXRuby-specific questions.
Hope this helps,
Lyle