Zhimin Zhan
2009-Nov-09 01:12 UTC
Wx::Gauge failed to set foreground colour using XP Style
My application has a Wx::Gauge, its colour is changeable via set_foreground_colour method. After I updated the ruby.exe.manifest to use XP Styles, (http://rubyonwindows.blogspot.com/2007/10/windows-xp-visual-style-controls-with.html), the gauge''s foreground stays Green always without code changes. I think this might not be anything to do with WxRuby or WxWidget, but wondering whether any tricks there to enable changing Gauge colours with XP styles. Thanks, Zhimin -- Posted via http://www.ruby-forum.com/.
Mario Steele
2009-Nov-09 10:14 UTC
[wxruby-users] Wx::Gauge failed to set foreground colour using XP Style
On Mac OS X, and Windows XP, when native styles are used (EG: Windows XP using Win 95/98 styles, and not XP Styles), it is impossible to change the color of the Progress Bar, or some other controls. As you thought, this isn''t a wxRuby or wxWidgets failing, but the native OS'' inflexibility to allow changes to certain controls. The only other suggestion that I can make, is to create your own custom control, and use bitmaps, or what have ya to custom draw the progress bar you want. Take a look at some HTML/CSS/JavaScript Examples of Progress Bars, to get an idea of how you can start with creating your own custom Progress Bar. hth, Mario On Sun, Nov 8, 2009 at 8:12 PM, Zhimin Zhan <lists at ruby-forum.com> wrote:> > My application has a Wx::Gauge, its colour is changeable via > set_foreground_colour method. > > After I updated the ruby.exe.manifest to use XP Styles, > ( > http://rubyonwindows.blogspot.com/2007/10/windows-xp-visual-style-controls-with.html > ), > the gauge''s foreground stays Green always without code changes. > > I think this might not be anything to do with WxRuby or WxWidget, but > wondering whether any tricks there to enable changing Gauge colours with > XP styles. > > Thanks, > Zhimin > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users >-- Mario Steele http://www.trilake.net http://www.ruby-im.net http://rubyforge.org/projects/wxruby/ http://rubyforge.org/projects/wxride/ -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/wxruby-users/attachments/20091109/6526f825/attachment.html>