Link to home
Start Free TrialLog in
Avatar of third
thirdFlag for Philippines

asked on

150pts CustomDBGrid Component

ASKER CERTIFIED SOLUTION
Avatar of bes67
bes67

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of third

ASKER


Great, that did it exactly what i want! could you post your answer on the link i've given above so i can give you all the points.

btw, i have additional request. could it be possible to add a property that will control the spaces between the rows.

i have tried the code below but i'm not so sure if that's the right way to do it. it destroys the appearance of the image (i.e. not proportionally sized).

procedure TPicDBGrid.DrawColumnCell(const Rect: TRect; DataCol: Integer;
 Column: TColumn; State: TGridDrawState);
var
 OutRect : TRect;
begin
 inherited;
 if AnsiCompareText(Column.FieldName, PictureFieldName) = 0 then
   with Canvas do
   begin
     OutRect := Rect;
     InflateRect(OutRect,-2,-2);
     StretchDraw(OutRect, FPicture.Bitmap);
   end;
end;

thanks again! ;-)
Avatar of bes67
bes67

I have posted on given link and ... take a look on Indent property

Avatar of third

ASKER

here's the bonus... thanks again! ;-)