[fxruby-users] Problems with FXIconList and Icons

Alexander Jede alexjede at gmx.de
Thu Jun 22 07:03:12 EDT 2006

Hi list,
I am writing a small program where I want to display some objects in an
IconList. For a better looking a choose an an .png and created a
FXPNGIcon instance of it.
When the program starts it creates an empty FXIconList and the Icons
will initialized too.
While using the program it should be possible to add some objects to the
But if I run the program is crashes with this message:

"FXDCWindow::drawIcon: illegal icon specified."

I do not now what I had made wrong.
Because if I insert some objects to the iconlist during the
initialization (in de initialize method) it works great!

The code looks like:
def initialize()
@iconNonterm = loadIcon("tb_buttonbx01.png")
@nonterminallist =
def onRightNonterm(sender,sel,ptr)
    if !ptr.moved
    menu = FXMenuPane.new(sender)
    newI = FXIconItem.new("Bla", at iconNonterm, at iconNonterm)

Thanks a lot
Alexander Jede

More information about the fxruby-users mailing list