Page 1 of 1

Paint issue

Posted: 01 Oct 2012, 09:41
by Mex
Hi Timo,

1) Add frame control
2) Add TextBox control inside frame control
3) Add some text to textbox
4) Set textbox to readonly

if theme is used, no text is visible. If i set the disabledbackgroundcolor manually to something else then everything is ok.
This happens only when textbox is inside frame control.

Alles gute;
Meelis

Re: Paint issue

Posted: 02 Oct 2012, 05:57
by TiKu
Hi,

thanks for your bug report. Which version of Windows do you use? So far I cannot reproduce the problem (Windows 7 x64 SP1).

Regards
TiKu

Re: Paint issue

Posted: 02 Oct 2012, 06:54
by Mex
Hi Timo,

Windows XP SP3 and im using all your latest controls.


Regards;
Meelis

Re: Paint issue

Posted: 02 Oct 2012, 07:12
by TiKu
Okay, maybe it's specific to Windows XP. I'll test tonight.

Re: Paint issue

Posted: 02 Oct 2012, 21:55
by TiKu
Hi Meelis,

I can reproduce the problem on Windows XP and am working on a fix.

Regards
TiKu

Re: Paint issue

Posted: 03 Oct 2012, 15:12
by TiKu
Hi,

the problem has been caused by the TextBox control. Here's an update for the EditControls library:
www.timosoft-software.de/stuff/editctls182165-rel.zip
http://www.timosoft-software.de/stuff/E ... elease.exe

I don't really like my bugfix (which consists of reactivated old code). If the system is Windows XP, the control now creates a pattern brush which contains the themed background and tells the system to use this brush whenever it needs to draw the control's background. Basically this works very well and you won't see any flickering. However, I remember an old bug report where the user got an all-black background. I never have been able to reproduce this, but chances are good, that this happens if the pattern brush becomes very large so that the system cannot handle it anymore. That's why I switched to another approach that flickers a bit, but doesn't require a pattern brush. But looks like Windows XP doesn't like this new approach...