FxRuby: changing button icon

I was going through the button.rb example of FXRuby and got curious. I tried
adding another radial button to select the icon that is displayed on the
image. The FXButton doesn't give you visibility to the icon, so I tried
adding it into the FXButton class. Now I could change the icon but the
screen depiction didn't change ( I didn't really expect this to work).
Is there a way to change the button icon on the fly, or a should I delete
the button and add a new one, or should I have 4 or so buttons, but only one
visible?
P.S. As you may have surmised, I am new to FXRuby.

Sure it does. That's what the "icon" accessor is for:

    button.icon = ... some other icon ...

Note that if you construct a new icon after the application is
running, you'll need to call create on it before you can assign it to
the button. There is a question (and answer!) about this in the FOX
FAQ list at http://www.fox-toolkit.com.

Hope this helps,

Lyle

ยทยทยท

On 10/25/05, soxinbox <faker@yahoo.com> wrote:

I was going through the button.rb example of FXRuby and got curious. I tried
adding another radial button to select the icon that is displayed on the
image. The FXButton doesn't give you visibility to the icon...

"Lyle Johnson" <lyle.johnson@gmail.com> wrote in message
Note that if you construct a new icon after the application is
running, you'll need to call create on it before you can assign it to
the button. There is a question (and answer!) about this in the FOX
FAQ list at http://www.fox-toolkit.com.

Hope this helps,

Lyle

That was it. Thanks for the help.