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?
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. | +----------------------------------------------------------------------------+
jeroen wrote:> 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.Thanks! Works nicely now.
I''m just starting with FXRuby and have two very basic questions. 1 - Is the API documentation "downloadable"? The online version seems clear enough..but one has to be online to read it...or so it seems. 2 - I find the latest and the greatest available at RubyForge for download.....but pray-tell what is a "GEM" and how might one get the desired files from them? Thanks ahead of time! Ron