<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jan 24, 2009, at 6:26 AM, James Hibbard wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">I wrote a GUI using FXRuby under WinXP.<br>I then upgraded to Vista, installed Ruby (and thus by default FXRuby) and ran my GUI.<br>It was then that I noticed that the colours have gone weird.<span class="Apple-converted-space"> </span><br>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).<br>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.<br>I'm looking for a setting I can apply to make the colour for the application uniform and overide the system default.<br>I already tried such things as app.backColour = FXRGB(236, 233, 216).</div></div></div></span></blockquote><div><br></div>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.</div><div><br></div><div>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:</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>app = FXApp.new</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>app.init(ARGV)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>#<br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span># Change default colors here, e.g.<br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span># <span class="Apple-tab-span" style="white-space:pre">        </span>app.backColor = FXRGB(236, 233, 216)<br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>#<br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>main_window = FXMainWindow.new(app, ...)<br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>app.create</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>app.run</div><div><br></div><div>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.</div><div><br></div><div>Hope this helps,</div><div><br></div><div>Lyle</div></body></html>