Hi, I wrote a GUI using FXRuby under WinXP. I then upgraded to Vista, installed Ruby (and thus by default FXRuby) and ran my GUI. It was then that I noticed that the colours have gone weird. The main user interface is now white (the default colour that Vista uses), but all of the data targets and tables have remained beige (RGB 236, 233, 216). Of course one can individualy declare a white background colour for each of these widgets, but then it looks garish if run on XP or Linux. I''m looking for a setting I can apply to make the colour for the application uniform and overide the system default. I already tried such things as app.backColour = FXRGB(236, 233, 216). In an earlier post it was suggested that I could change these settings by running FOX ControlPanel application. Unfortunately I have no idea how to do this and extensive Googling has yielded no results. I would be grateful for any help you could give. I have included a screenshot to highlight my problem. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/fxruby-users/attachments/20090124/d8cd0a0e/attachment-0001.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: vista_colours.jpg Type: image/jpeg Size: 63272 bytes Desc: not available URL: <http://rubyforge.org/pipermail/fxruby-users/attachments/20090124/d8cd0a0e/attachment-0001.jpg>
Le 24 janv. 2009 ? 13:26, James Hibbard a ?crit :> Hi, > > I wrote a GUI using FXRuby under WinXP. > I then upgraded to Vista, installed Ruby (and thus by default > FXRuby) and ran my GUI. > It was then that I noticed that the colours have gone weird. > The main user interface is now white (the default colour that Vista > uses), but all of the data targets and tables have remained beige > (RGB 236, 233, 216). > Of course one can individualy declare a white background colour for > each of these widgets, but then it looks garish if run on XP or Linux. > I''m looking for a setting I can apply to make the colour for the > application uniform and overide the system default. > I already tried such things as app.backColour = FXRGB(236, 233, 216). > In an earlier post it was suggested that I could change these > settings by running FOX ControlPanel application.You certainly installed FOX, before installing FXRuby. FOX built a couple of executables (don''t ask me where I''m on a Mac), by me they are in /usr/local/src/tests/ControlPanel /usr/local/src is where I put the FOX source code to compile it. I have no idea if the tests applications are installed automatically on Windows machines. They are not on Mac, that may be the problem you face, if you have installed a pre-compiled binary shipped without the tests. It does not help much, but it may explain your problem. Cheers, Mich?le <http://micmacfr.homeunix.org> ? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/fxruby-users/attachments/20090124/55e0d550/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: 36C471DED4B09EEB30A0281F2608DB2FE6F9E147.gpgkey Type: application/octet-stream Size: 1744 bytes Desc: not available URL: <http://rubyforge.org/pipermail/fxruby-users/attachments/20090124/55e0d550/attachment.obj> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/fxruby-users/attachments/20090124/55e0d550/attachment-0001.html>
On Jan 24, 2009, at 6:26 AM, James Hibbard wrote:> I wrote a GUI using FXRuby under WinXP. > I then upgraded to Vista, installed Ruby (and thus by default > FXRuby) and ran my GUI. > It was then that I noticed that the colours have gone weird. > The main user interface is now white (the default colour that Vista > uses), but all of the data targets and tables have remained beige > (RGB 236, 233, 216). > Of course one can individualy declare a white background colour for > each of these widgets, but then it looks garish if run on XP or Linux. > I''m looking for a setting I can apply to make the colour for the > application uniform and overide the system default. > I already tried such things as app.backColour = FXRGB(236, 233, 216).If you didn''t build FOX from source code, you probably don''t have the FOX Control Panel application installed, and so you''ll need to change these default colors in your application code. The trick, however, is to change the color values after the FXApp''s init() method gets called, but before you create any of your application''s widgets: app = FXApp.new app.init(ARGV) # # Change default colors here, e.g. # app.backColor = FXRGB(236, 233, 216) # main_window = FXMainWindow.new(app, ...) app.create app.run When you construct a widget (like an FXMainWindow), it copies the colors from FXApp, and so if you haven''t changed them by that point you have to go make changes on a widget-by-widget basis (which is a pain). Also, note that in many FXRuby applications you won''t see FXApp#init called explicitly, because it gets called automatically for you if you don''t need it. Hope this helps, Lyle -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/fxruby-users/attachments/20090125/23587b58/attachment.html>
That worked perfectly :-) Thank you very much for your help, and thank you everybody else for the replies. ________________________________ From: Lyle Johnson <lyle at lylejohnson.name> To: fxruby-users at rubyforge.org Sent: Sunday, 25 January, 2009 20:55:27 Subject: Re: [fxruby-users] Overriding default GUI colors On Jan 24, 2009, at 6:26 AM, James Hibbard wrote: I wrote a GUI using FXRuby under WinXP. I then upgraded to Vista, installed Ruby (and thus by default FXRuby) and ran my GUI. It was then that I noticed that the colours have gone weird. The main user interface is now white (the default colour that Vista uses), but all of the data targets and tables have remained beige (RGB 236, 233, 216). Of course one can individualy declare a white background colour for each of these widgets, but then it looks garish if run on XP or Linux. I''m looking for a setting I can apply to make the colour for the application uniform and overide the system default. I already tried such things as app.backColour = FXRGB(236, 233, 216). If you didn''t build FOX from source code, you probably don''t have the FOX Control Panel application installed, and so you''ll need to change these default colors in your application code. The trick, however, is to change the color values after the FXApp''s init() method gets called, but before you create any of your application''s widgets: app = FXApp.new app.init(ARGV) # # Change default colors here, e.g. # app.backColor = FXRGB(236, 233, 216) # main_window = FXMainWindow.new(app, ...) app.create app.run When you construct a widget (like an FXMainWindow), it copies the colors from FXApp, and so if you haven''t changed them by that point you have to go make changes on a widget-by-widget basis (which is a pain). Also, note that in many FXRuby applications you won''t see FXApp#init called explicitly, because it gets called automatically for you if you don''t need it. Hope this helps, Lyle -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/fxruby-users/attachments/20090125/6cf521e2/attachment-0001.html>