From: Mattia B. <mb...@ds...> - 2002-09-02 16:44:42
|
No platform, wxWindows, wxPerl version Assuming Win32, wxWindows 2.2.x, some wxPerl (does not matter) > Hi. > I've tried using > Set(Fore|Back)groundColour > with Wx::StaticLine, > but it's not working. > > Wx::Static line is a Wx::Window, so it should happen. Yes. > Refresh should help, but it doesn't. > Neither does Clear. > > Calling Show('show') does paint it the default light gray, but only if you pass Show > as string. Show(1) doesn't quite work. (this is also very bizzare ). Well, the bizarre thing is that you need to call Show... why do you call it? As for the string thing, I don't know why it happens. > The color gets set, cause if I set/get it, I can see that the values are correct, > the static line just never gets painted, like it should. > > I believe this to be a bug ( it can't be because it's a "static" line, > or can it ;)? Yes :) it appears Windows treats static controls differently from other windows when it comes to color handling. > My example is below, width peaks at 80 chars ;) I *really* appreciate the test case, but, in general, I will appreciate it much more if it is a *minimal* test case; for example, adding this ---- my $sta = Wx::StaticLine( ... ); $sta->SetBackgroundColour( Wx::Colour->new( 'red' ) ); ---- to the minimal sample, is sufficient to demonstarte the bug. The reason is that, in general, it is much easier to track down bugs with a minimal testcase than with a complex one. Regards Mattia |