const
GrabberSize = 12;
procedure TForm1.DoPaintSidePanel();
procedure DrawGrabberLine(ALeft, ATop, ARight, ABottom: Integer);
begin
with Canvas do
begin
Pen.Color := clBtnHighlight;
MoveTo(ARight, ATop);
LineTo(ALeft, ATop);
LineTo(ALeft, ABottom);
Pen.Color := clBtnShadow;
LineTo(ARight, ABottom);
LineTo(ARight, ATop-1);
end;
end;
begin
Canvas.Lock;
try
DrawGrabberLine(3, 12, 5, Height-2);
DrawGrabberLine(6, 12, 8, Height-2);
finally
Canvas.Unlock;
end;
end;
procedure TForm1.FormPaint(Sender: TObject);
begin
DoPaintSidePanel();
end;
THIS BLOG IS AIMED AT DELPHI, C#.NET, ASP.NET PROFESSIONALS WHO ARE NEW TO THE COMMUNITY AND LOOKING FOR TIPS AND TRICKS. IT WILL HOPEFULLY SHOW YOU HOW AND WHERE TO GET HELP BUT WILL NOT TELL YOU HOW TO DO YOUR JOB - THAT BIT IS UP TO YOU.
Friday, November 26, 2010
Draw Grabber Line on Canvas / Form
Below is the code snippet to draw a Grabber line... Its all self explainatory
Labels:
Canvas,
Delphi,
DockFrame,
GrabberLine,
Non - VCL
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment