I have tried that, the code works fine for the panel which I included but
the scroll box does not work at all.

Chris


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of Mark Derricutt
Sent: Thursday, August 26, 1999 11:43 AM
To: Multiple recipients of list Delphi
Subject: RE: [DUG]: AlignControl does not work in TScrollBox


On Thu, 26 Aug 1999, Dennis Chuah wrote:

> > begin
> >   InflateRect(Rect, -BorderWidth, -BorderWidth);
> >   inherited AlignControls(AControl, Rect);
> > end;

This is the code I use in one of my component to do just that,
OffsetTop/Left/Right/Bottom are custom properties that I added to the
component.

procedure TImagePanel.AlignControls(AControl: TControl; var Rect: TRect);
begin
  Rect.Top := OffsetTop;
  Rect.Left := OffsetLeft;
  Rect.Right := Rect.Right - OffsetRight;
  Rect.Bottom := Rect.Bottom - OffsetBottom;
  inherited AlignControls(AControl, Rect);
end;


--
Mark Derricutt                     | Chalice of Blood
Software Developer                 | New Zealand Christian Music News
Auckland, New Zealand              | http://www.chalice.gen.nz
[EMAIL PROTECTED]                | UIN: 1934853

Getting jiggy with Claymation - Round

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to