Board index » delphi » Pb with TDBGrid and Win XP Home Edition

Pb with TDBGrid and Win XP Home Edition

Hello,

I use Delphi 5 Pro on a Windows XP Home Edition.

On a form of my project, there is a TDBGrid.

The OnDrawColumnCell event is like this :

case DataCol of
    0 : //column number 1
        begin
            ...
            Drawing something here with TDBGrid canvas
            ...
        end;
    1: //Column number 2
        begin
            ...
            Drawing something here with TDBGrid canvas
            ...
        end;
    etc..
end;

When I use Windows XP Style this event is fired only for the DataCol 0 when
I scroll down or up the DBGrid.
So, only the first column is drawed correctly and scroll.
When I use Classic Windows Style under XP there is no pb and all the columns
are drawed and scrolled correctly.

I think there is a pb with TDBGrid. I searched for Technical information on
Borland's site but I found nothing.

I tried my prog with Delphi 7 and there is the same pb.

If someone coul help me !!!

Thanks You

 

Re:Pb with TDBGrid and Win XP Home Edition


Hello Nicolas,

Try to vary the colors you use for painting. Under WinXP, colors with the
same name can have different values. IIRC, in the Silver color scheme,
clButtonFace seems is white.

--
Andrei Fomine    www.quasidata.com
DbAltGrid - multi-line layout, RTF and graphics of any kind in DBGrid.
Transfer@once - full-blown clipboard and drag-and-drop data transfer
to/from any control in many formats, including ones native to MS Office.

Quote
"Nicolas MARCHAND" <pro...@club-internet.fr> wrote in message

news:3da68034@newsgroups.borland.com...
Quote
> Hello,

> I use Delphi 5 Pro on a Windows XP Home Edition.

> On a form of my project, there is a TDBGrid.

> The OnDrawColumnCell event is like this :

> case DataCol of
>     0 : file://column number 1
>         begin
>             ...
>             Drawing something here with TDBGrid canvas
>             ...
>         end;
>     1: file://Column number 2
>         begin
>             ...
>             Drawing something here with TDBGrid canvas
>             ...
>         end;
>     etc..
> end;

> When I use Windows XP Style this event is fired only for the DataCol 0
when
> I scroll down or up the DBGrid.
> So, only the first column is drawed correctly and scroll.
> When I use Classic Windows Style under XP there is no pb and all the
columns
> are drawed and scrolled correctly.

> I think there is a pb with TDBGrid. I searched for Technical information
on
> Borland's site but I found nothing.

> I tried my prog with Delphi 7 and there is the same pb.

> If someone coul help me !!!

> Thanks You

Other Threads