Autor Beitrag
V!P3R Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 151



BeitragVerfasst: Sa 01.12.07 17:53 
user profile icon.#R4id hat folgendes geschrieben:
Oben hast du geschrieben du willst mehrere Shapes erstellen :!:


ja, das ist auch soweit richtig, ich meinte aber folgendes.

Click auf Button1
1 neues shape wird ertsllt
2. Click auf Button1
noch ein shape wird erstellt
3.Click auf den button, wieder wird ein shape erstellt
4.usw

und davon beliebig viele!
.#R4id
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 90

Windows XP Prof.
CodeGear Delphi 2007
BeitragVerfasst: Sa 01.12.07 18:20 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
var
  Int: Integer = 0;
  Form1: TForm;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender as TObject);
var
  MyShape: TShape;
begin
  Inc(Int);
  
  MyShape := TShape.Create(Form1);
  try
    MyShape.Name := 'Shape' + IntToStr(Int);
    MyShape.Parent := Form1;
    MyShape.Tag := Int;
    MyShape.Left := 8;
    MyShape.Top := 8;
    MyShape.Width := 48;
    MyShape.Height := 48;
    MyShape.Show;
  finally
  end;
end;
Der Quellcode macht genau das was du gesagt hast.
V!P3R Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 151



BeitragVerfasst: So 02.12.07 10:08 
Vielen Dank, es klappt perfekt.

Wie du shon sagtest, für ne andere frage ein neuer Thread.

ich will ein shape markieren
Hier:
www.delphi-forum.de/...en+sodass_78766.html

MfG