Hello I''m having problems with rhis error, I couldnt found the solution (or even mention) on the internet I''m doing a toolbar, called @toolBarPrincipal, then I add the tool,and finally the #realize() method. This error happens when openig the file (on windows, linux ran pretty well) I still can work with the program but the icon (or bitmap or whatever) doesnt shows. The Code is: @toolBarPrincipal=create_tool_bar(TB_HORIZONTAL | NO_BORDER | TB_FLAT | TB_TEXT ) @toolBarPrincipal.add_tool(-1, ''Bonzai2'', Bitmap.new("C:/rubyCode/icons/bonsai.ico")) @toolBarPrincipal.realize() also tryed: @toolBarPrincipal.add_tool(-1, ''Bonzai2'', Bitmap.new("C:/rubyCode/icons/bonsai.bmp")) Renaming the file or savin as from mspaint, but no good. Does anyone knows how to solve it? Thanks -- Posted via http://www.ruby-forum.com/.
Alex Fenton
2008-Oct-18 14:45 UTC
[wxruby-users] wxRuby error: Image file is not of type 9
Omar Hernandez wrote:> @toolBarPrincipal=create_tool_bar(TB_HORIZONTAL | NO_BORDER | TB_FLAT | > TB_TEXT ) > @toolBarPrincipal.add_tool(-1, ''Bonzai2'', > Bitmap.new("C:/rubyCode/icons/bonsai.ico"))Try adding the type argument to tell wxRuby what type of image file you''re loading from Wx::Bitmap.new("/path/to/icon.ico", Wx::BITMAP_TYPE_ICO) See the Wx::Bitmap documentation for a list of supported types. For cross-platform use, I''d recommend using PNG over ICO or BMP hth alex
Omar Hernandez
2008-Nov-12 00:35 UTC
[wxruby-users] wxRuby error: Image file is not of type 9
> Try adding the type argument to tell wxRuby what type of image file > you''re loading from > > Wx::Bitmap.new("/path/to/icon.ico", Wx::BITMAP_TYPE_ICO) > > See the Wx::Bitmap documentation for a list of supported types. For > cross-platform use, I''d recommend using PNG over ICO or BMP > > hth > alexThanks, it''s working fine. -- Posted via http://www.ruby-forum.com/.