TGradient Problem with Windows7

Post here your experiences, comments, suggestions, or bug reports regarding to the DELPHI AREA products. Not-matching topics will be moved or deleted.

TGradient Problem with Windows7

by soul » 02/03/10 10:34

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
Member
Member
 
Posts: 4
Joined: 02/03/10 10:21

Re: TGradient Problem with Windows7

by Kambiz » 02/03/10 16:16

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

Donate a cup of food for free: Click to Give @ The Hunger Site
User avatar
Kambiz
Administrator
Administrator
 
Posts: 1940
Joined: 07/03/03 19:10
Location: Tehran, Iran

Re: TGradient Problem with Windows7

by soul » 02/03/10 16:55

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... :?
You do not have the required permissions to view the files attached to this post.
soul
Member
Member
 
Posts: 4
Joined: 02/03/10 10:21

Re: TGradient Problem with Windows7

by Kambiz » 02/03/10 18:47

Please send me your source code, because all is fine with me.
Kambiz

Donate a cup of food for free: Click to Give @ The Hunger Site
User avatar
Kambiz
Administrator
Administrator
 
Posts: 1940
Joined: 07/03/03 19:10
Location: Tehran, Iran

Re: TGradient Problem with Windows7

by soul » 03/03/10 12:21

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
Member
Member
 
Posts: 4
Joined: 02/03/10 10:21

Re: TGradient Problem with Windows7

by Kambiz » 03/03/10 13:54

According to the fix, I think the display driver of your computer needs to be updated.
Kambiz

Donate a cup of food for free: Click to Give @ The Hunger Site
User avatar
Kambiz
Administrator
Administrator
 
Posts: 1940
Joined: 07/03/03 19:10
Location: Tehran, Iran

Re: TGradient Problem with Windows7

by soul » 03/03/10 15:10

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

thx
soul
Member
Member
 
Posts: 4
Joined: 02/03/10 10:21


Return to DELPHI AREA Products

Who is online

Users browsing this forum: No registered users and 0 guests