How to add icon to window

I have icon file and I want to add it to top-left of my application
How can I add it ??

Pat K. wrote:

I have icon file and I want to add it to top-left of my application
How can I add it ??

Use Frame#icon= or Frame#set_icon method.

PNG icons are usually the best cross-platform option:

my_frame.icon = Wx::Icon.new(‘path/to/icon.png’, Wx::BITMAP_TYPE_PNG)

You can also use .ico icons on Windows only, and .xpm on Linux:

my_frame.icon = Wx::Icon.new(’/path/to/icon.ico’)

You might want to take a look at the samples directory that comes with
wxRuby. Most basic operations such as this, as well as many advanced
usages are demonstrated in those samples.

alex

thank you :slight_smile: