[fxruby-users] iconPosition in table
jeroen
jeroen at fox-toolkit.org
Thu Sep 23 00:08:46 EDT 2004
On Wednesday 22 September 2004 05:59 pm, Joel VanderWerf wrote:
> I'm having trouble getting an icon to appear to the left of the text in
> a cell. Fox example, in the table.rb example, I changed ABOVE to LEFT:
>
> @table.getItem(6, 6).icon = penguinicon
> @table.getItem(6, 6).iconPosition = FXTableItem::LEFT
> @table.getItem(6, 6).justify = 0 # centered text
>
> but the icon and text are superimposed. Works fine with ABOVE and BELOW,
> but not with RIGHT and LEFT. I've tried varying the text justify as
> well, but maybe I haven't found the right combination.
>
> Any ideas?
Use BEFORE and AFTER.
You have two independent set of options:
1) justification of items withing the field. This can be
LEFT, RIGHT, CENTER_X for X, and TOP, BOTTOM, CENTER_Y for Y.
2) relative placement of icon and label. This can be
BEFORE, AFTER, ABOVE, BELOW.
So suppose I have a rectangle:
+----------------------+
| |
| @ label | BEFORE and CENTER_X, CENTER_Y
| |
+----------------------+
and:
+----------------------+
| |
| @|
| label| ABOVE and RIGHT, CENTER_Y
| |
+----------------------+
and:
+----------------------+
| |
| |
| label |
|@ | BELOW, BEFORE, and LEFT, BOTTOM
+----------------------+
Hope this helps; there are lots of possibilities...
- Jeroen
--
+----------------------------------------------------------------------------+
| Copyright (C) 22:50 09/22/2004 Jeroen van der Zijp. All Rights Reserved. |
+----------------------------------------------------------------------------+
More information about the fxruby-users
mailing list