Board index » delphi » Strange bug in TPageControl and TTabControl when using themes

Strange bug in TPageControl and TTabControl when using themes

Hi all,
I posted it to QCentral (#3633), but I think it's better to ask here too.
If you have a page (or tab) control with multiline set to false and several
pages(tabs) so the scroll buttons appear, there is a strange effect like a
clipping region set at the line where these scroll buttons appear which will
cut several types of controls (buttons - including speedbutton, checkbox,
radio) but not edit, panel, ...
I tracked it and it seems to happen when calling DrawParentBackground. I
forced in several places SelectClipRgn(DC, 0), but this is not a solution.
There is an error in Delphi handling the theme painting.
I hope someone finds more about it. I posted also a simple project to
attachments group.

Gabriel

 

Re:Strange bug in TPageControl and TTabControl when using themes


The problem is the use of TGraphic controls.
 the theme painting is done mostly by the OS.
So that if your app were to run on a W2k or <
 PC the themes will not be there, they are simply
automatic
 so i really don't know how the TGraphic controls are handled
but i can only assume that the OS maybe treating them as simply
part of a Twindowcontrol in the background..
i suppose you could fix these problems by creating tempory WindowControls
to paint the actual surface.. etc..
Quote
Gabriel Corneanu wrote:
> Hi all,
> I posted it to QCentral (#3633), but I think it's better to ask here too.
> If you have a page (or tab) control with multiline set to false and several
> pages(tabs) so the scroll buttons appear, there is a strange effect like a
> clipping region set at the line where these scroll buttons appear which will
> cut several types of controls (buttons - including speedbutton, checkbox,
> radio) but not edit, panel, ...
> I tracked it and it seems to happen when calling DrawParentBackground. I
> forced in several places SelectClipRgn(DC, 0), but this is not a solution.
> There is an error in Delphi handling the theme painting.
> I hope someone finds more about it. I posted also a simple project to
> attachments group.

> Gabriel

Re:Strange bug in TPageControl and TTabControl when using themes


In article <3e5f1...@newsgroups.borland.com>, Gabriel Corneanu
<nospam.gabrielcorne...@hotmail.com> writes

Quote
>Hi all,
>I posted it to QCentral (#3633), but I think it's better to ask here too.
>If you have a page (or tab) control with multiline set to false and several
>pages(tabs) so the scroll buttons appear, there is a strange effect like a
>clipping region set at the line where these scroll buttons appear which will
>cut several types of controls (buttons - including speedbutton, checkbox,
>radio) but not edit, panel, ...
>I tracked it and it seems to happen when calling DrawParentBackground. I
>forced in several places SelectClipRgn(DC, 0), but this is not a solution.
>There is an error in Delphi handling the theme painting.
>I hope someone finds more about it. I posted also a simple project to
>attachments group.

>Gabriel

Are you sure it's not simply a driver problem? Try running the app in
safe mode to see if it is consistent.

Bernard Hill
Selkirk, Scotland

Other Threads