Hi, I googled for this but did not see anything, so I''m asking here. 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? Thanks! Jamey Cribbs Confidentiality Notice: This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and/or privileged information. If you are not the intended recipient(s), you are hereby notified that any dissemination, unauthorized review, use, disclosure or distribution of this email and any materials contained in any attachments is prohibited. If you receive this message in error, or are not the intended recipient(s), please immediately notify the sender by email and destroy all copies of the original message, including attachments.
On Tuesday 01 March 2005 01:20 pm, Jamey Cribbs wrote:> Hi, I googled for this but did not see anything, so I''m asking here. > > 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?1) FXShutterItem allows you to access FXButton, so there should be no reason to subclass. 2) You can setIcon(), setText(), setJustify() and setIconPosition() on the button, and lay out the icon/text any way possible. Regards, - Jeoren
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, LAYOUT_FILL_Y) 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.
Lyle Johnson wrote:> > 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, > LAYOUT_FILL_Y) > shutterItem.button.icon = redMacOS # <----- Added this > shutterItem.button.iconPosition = TEXT_BELOW_ICON # <----- Added this >Thanks Jeroen and Lyle for your responses. I used the iconPosition attribute of FXButton and it worked fine. What I was trying to use before was the buttonStyle attribute of FXButton and passing it TEXT_BELOW_ICON and that wasn''t working. Thanks again! Jamey Confidentiality Notice: This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and/or privileged information. If you are not the intended recipient(s), you are hereby notified that any dissemination, unauthorized review, use, disclosure or distribution of this email and any materials contained in any attachments is prohibited. If you receive this message in error, or are not the intended recipient(s), please immediately notify the sender by email and destroy all copies of the original message, including attachments.