<?xml version="1.0" encoding="windows-1252"?>
<node id="1014212" title="wxPerl window colors" created="2013-01-19 10:02:23" updated="2013-01-19 10:02:23">
<type id="115">
perlquestion</type>
<author id="748836">
sdetweil</author>
<data>
<field name="doctext">
not technically a perl question, but app written in Perl, and the widest skill base is clearly here.
&lt;br&gt;&lt;br&gt;
so, my users want to change the colors of one of the windows in our application..
&lt;br&gt;&lt;br&gt;
it is a wxPerl wxTextCtrl
&lt;br&gt;&lt;br&gt;
the code does a wxSetForegroundColour() and wxSetBackgroundColour(), and then does a window-&gt;Update
&lt;br&gt;&lt;br&gt;
the background changes. the foreground does not..
except, when we write more info to the window, it comes out with the new foreground color. 
&lt;br&gt;&lt;br&gt;
&lt;code&gt;                            
# in RGB colors
$detailsInfo-&gt;SetBackgroundColour(Wx::Colour-&gt;new($tokens[1], $tokens[2], $tokens[3]));
$detailsInfo-&gt;SetForegroundColour(Wx::Colour-&gt;new($tokens[1], $tokens[2], $tokens[3]));
$detailsInfo-&gt;Refresh();

&lt;/code&gt;			
we tried $detailsInfo-&gt;Update();
&lt;br&gt;&lt;br&gt;
of course this only fails on *ix, on Windows it behaves as expected. 
&lt;br&gt;&lt;br&gt;
so there must be some rules about a multiline text control
in gtk that I don't understand.
</field>
</data>
</node>
