[fxruby-users] FXShutterItem Button Icon

Lyle Johnson lyle at knology.net
Wed Mar 2 08:42:18 EST 2005

On Mar 1, 2005, at 1:20 PM, Jamey Cribbs wrote:

> I have an FXShutter.  I'm trying to put an icon, with text below it, 
> on each FXShutterItem.  I have subclassed the FXShutterItem and, I am 
> trying to pass TEXT_BELOW_ICON to the FXShutterItem's embedded button, 
> but it does not appear to work.  Both the icon and the text show up on 
> the embedded button, but they are both centered and the text is 
> centered OVER the icon instead of below it.
> Is this possible?

As Jeroen said in his response, this should work. I just took the 
shutter.rb example program included with FXRuby and added a few lines 
right after it creates the first shutter item:

	shutterItem = ShutterItem.new(@shutter, "Lookout Shortcuts", nil, 
	shutterItem.button.icon = redMacOS # <----- Added this
	shutterItem.button.iconPosition = TEXT_BELOW_ICON # <----- Added this

and got the desired result. Make sure that you're setting the 
TEXT_BELOW_ICON option on the shutter item's button, and not on the 
shutter item itself. If it's still not working, please shoot me a 
sample program that demonstrates the problem.

More information about the fxruby-users mailing list