Displaying 3 results from an estimated 3 matches for "icon_file".
Did you mean:
conf_file
2007 Oct 18
6
Bug in minimal.rb
...new(parent, :pos => [5, 25], :size => [100, 300] )
TreeCtrl.new(parent, pos: [5, 25], size: [100, 300] )
Aside from the earned praise, I found a glitch in
samples/minimal/minimal.rb:
- # PNG is a good choice for cross-platofrm icons
+ # PNG is a good choice for cross-platform icons
icon_file = File.join( File.dirname(__FILE__), ''mondrian.png'')
- self.icon = Wx::Icon.new(icon_file)
+ self.icon = Wx::Icon.new(icon_file, Wx::BITMAP_TYPE_PNG)
Without Wx::BITMAP_TYPE_PNG it does not recognize the icon on my
system:
WinXP,
ruby 1.8.6 (2007-03-13 patchlevel 0) [i386-...
2007 Feb 12
0
[871] trunk/wxruby2/samples/printing/printing.rb: Enable sample to be run from other directories
...quot;cx">
</span><span class="cx"> # Load icon
</span><span class="cx"> if Wx::PLATFORM == "WXMSW"
</span><del>- my_icon = Wx::Icon.new("mondrian.ico",Wx::BITMAP_TYPE_ICO)
</del><ins>+ icon_file = File.join(File.dirname(__FILE__), ''mondrian.ico'')
+ my_icon = Wx::Icon.new(icon_file, Wx::BITMAP_TYPE_ICO)
</ins><span class="cx"> else
</span><del>- my_icon = Wx::Icon.new("mondrian.xpm",Wx::BITMAP_TYPE_XPM)
</del>...
2006 Dec 26
0
[806] trunk/wxruby2/samples/treectrl: Restored demonstration of use of icons and fonts within TreeCtrl
...- orig_size = icons[0].get_width()
- for i in 0 ... icons.length
- if size == orig_size
- images.add(icons[i])
- else
- images.add(icons[i])
- end
</del><ins>+ Wx::BusyCursor.busy do
+ icons = (1 .. 5).map do | i |
+ icon_file = File.join(File.dirname(__FILE__), "icon#{i}.xpm")
+ # Wx::Icon.new(icon_file, Wx::BITMAP_TYPE_XPM, 16, 16)
+ Wx::Bitmap.new(icon_file, Wx::BITMAP_TYPE_XPM)
</ins><span class="cx"> end
</span><del>-
- assign_image_list(imag...