Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Draw an arrow inside a GroupBox? 1

Status
Not open for further replies.

LucieLastic

Programmer
May 9, 2001
1,694
GB
hi

Trying to draw an arrow inside a groupbox but with no luck.

I'm trying to use canvas.lineto etc but nothing appears.

Is it possible, another example is needed.

many thanks
lou

 
Hi Lou,

As far as I am aware, TGroupBoxes don't have canvases. But you could try placing a TImage within the group box and using it's canvas with the following code:
Code:
with Image1.Canvas do
  begin
    Pen.Color := clBlack;
    MoveTo(0, 50);
    LineTo(0, 70);
    LineTo(50, 70);
    LineTo(50, 75);
    LineTo(60, 60);
    LineTo(50, 45);
    LineTo(50, 50);
    LineTo(0, 50);
    Brush.Color := clRed;
    FloodFill(30, 60, clBlack, fsBorder);
  end;
Clive [infinity]
 
Thanks Clive, works a treat. Don't know why I didn't think of that [wink]. Just need to work out the transparent background and I'm 'cooking with gas'.

big ta
lou
 
Transparency sussed.

image1.Transparent:= true;

thanks again
lou
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top