7
7stud --
The following is a simplified example from the wxRuby wiki here:
http://wxruby.rubyforge.org/wiki/wiki.pl?Frames_(Part_1)
It's the second example in the wxRuby tutorial entitled "Getting
Started". However, I don't seen any icon when I run the code on mac osx
10.4.11.
require 'rubygems'
require 'wx'
class IconFrame < Wx::Frame
def initialize
super(nil, -1, "Changing Icons", Wx:EFAULT_POSITION,
Wx::Size.new(300, 200)
)
set_icon(Wx::Icon.new("./icons/DataHD.png"))
show
end
end
class MinimalApp < Wx::App
def on_init
IconFrame.new
end
end
MinimalApp.new.main_loop
I also tried using some .ico files in set_icon(), but I don't see them
anywhere.
http://wxruby.rubyforge.org/wiki/wiki.pl?Frames_(Part_1)
It's the second example in the wxRuby tutorial entitled "Getting
Started". However, I don't seen any icon when I run the code on mac osx
10.4.11.
require 'rubygems'
require 'wx'
class IconFrame < Wx::Frame
def initialize
super(nil, -1, "Changing Icons", Wx:EFAULT_POSITION,
Wx::Size.new(300, 200)
)
set_icon(Wx::Icon.new("./icons/DataHD.png"))
show
end
end
class MinimalApp < Wx::App
def on_init
IconFrame.new
end
end
MinimalApp.new.main_loop
I also tried using some .ico files in set_icon(), but I don't see them
anywhere.