TGradient Problem with Windows7

Please post bug reports, feature requests, or any question regarding the DELPHI AREA products here.

TGradient Problem with Windows7

Postby soul » March 2nd, 2010, 10:34 am

Hello,

I've got a strange problem with the TGradient component under Windows7.
The canvas is not completely filled when I use the fill option gsLinearH - all others works fine!
There is always a small area (depends on the size of the canvas) at the bottom of the canvas which is not filled or filled with random "noise".

Anyone else got this problem? ...maybe solved?

thx!
soul
Active Member
Active Member
 
Posts: 5
Joined: March 2nd, 2010, 10:21 am

Re: TGradient Problem with Windows7

Postby Kambiz » March 2nd, 2010, 4:16 pm

I couldn't regenerate the problem.

I suggest to place the gradient control on a panel and set the panel's ParentBackground property to false.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2408
Joined: March 7th, 2003, 7:10 pm

Re: TGradient Problem with Windows7

Postby soul » March 2nd, 2010, 4:55 pm

Well, it's placed on a panel and ParentBackground is false.
Same Problem with Delphi 7 and Delphi 2007.

>>take a look at the screenshot...

hmmm... :?
Attachments
example.jpg
example.jpg (35.05 KiB) Viewed 1885 times
soul
Active Member
Active Member
 
Posts: 5
Joined: March 2nd, 2010, 10:21 am

Re: TGradient Problem with Windows7

Postby Kambiz » March 2nd, 2010, 6:47 pm

Please send me your source code, because all is fine with me.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2408
Joined: March 7th, 2003, 7:10 pm

Re: TGradient Problem with Windows7

Postby soul » March 3rd, 2010, 12:21 pm

Hi Kambiz,

I found the problem and was able to fix it or better - create a workaround for it. :wink:

Here is the code snippet:

Code: Select all
procedure LinearHorizontal(const Colors: TGradientColors; Pattern: TBitmap);
var
  X,Y: Integer;
  Row: PRGBQuadArray;
begin
  Pattern.Width := 256;
  Pattern.Height := 10;
  for Y :=0 to 9 do
  begin
    Row := PRGBQuadArray(Pattern.ScanLine[Y]);
    for X := 0 to 255 do
    begin
      Row[X] := Colors[X];
    end;
  end;
end;


thx for your support!
soul
Active Member
Active Member
 
Posts: 5
Joined: March 2nd, 2010, 10:21 am

Re: TGradient Problem with Windows7

Postby Kambiz » March 3rd, 2010, 1:54 pm

According to the fix, I think the display driver of your computer needs to be updated.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2408
Joined: March 7th, 2003, 7:10 pm

Re: TGradient Problem with Windows7

Postby soul » March 3rd, 2010, 3:10 pm

It really seems to be a problem with the display driver! :?
I cannot reproduce it on other Win7 machines...

thx
soul
Active Member
Active Member
 
Posts: 5
Joined: March 2nd, 2010, 10:21 am

Re: TGradient Problem with Windows7

Postby soul » April 23rd, 2010, 5:06 pm

PS: The problem is reproducible on all new HP Notebooks with preinstalled Win7.
Seems to be a problem with the default driver.

Regards,
Soul
soul
Active Member
Active Member
 
Posts: 5
Joined: March 2nd, 2010, 10:21 am

Re: TGradient Problem with Windows7

Postby ejla » April 25th, 2010, 1:20 pm

Have noticed similar problems with eg. bitmap images and some other things too, eg. TPanels and TLabels... I think these problems have very close relation to XPManifest component (if used).
As Kambiz pointed out, such as TPanels Parent Background must be set to false at RUNTIME, and TLabels Transparency even at RUNTIME... Desingtime settings seems to be ignored!?
With Bitmap problems I have found solutions with PixelFormat setting, eg. Image.Picture.Bitmap.PixelFormat := pf8bit;
Erkki
ejla
Active Member
Active Member
 
Posts: 10
Joined: March 24th, 2007, 1:07 am
Location: Sweden


Return to DELPHI AREA Products

Who is online

Users browsing this forum: No registered users and 1 guest

cron