Autor Beitrag
Bjoern128
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 17



BeitragVerfasst: Sa 20.07.02 11:20 
Hallo!

Ich habe folgendes Problem. Ich habe einen Typ deklariert Ttest und der hat eine Eigenschaft Menu:TPopupmenu. Jetzt möchte ich gerne dem Event onclick von TMenuitem definieren, aber ich weiß nicht wie dsa geht. Also das Popupmenu klappt zwar auf aber ich kann dem Menuitem eben kein Ereignis zuweisen.
Kann mir da jemand helfen wie dsa deklariert wird?

DAnke
Björn
Chris1308
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 220

Win XP Prof.
D2005 Prof, D7 Prof, D7 Pers
BeitragVerfasst: Sa 20.07.02 11:42 
Ich bin mir nicht sicher aber versuchs mal so:
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
procedure TForm1.meins(Sender: TObject);
begin
  ShowMessage('OnClick!');
end;

procedure TForm1.FormCreate(Sender: TObject);
var myTest: TTest;
begin
  myTest.Menu.Item1.OnCick := meins;
end;


Ich glaube so klappt das...

Chris1308
Bjoern128 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 17



BeitragVerfasst: Sa 20.07.02 12:27 
Titel: Problem nur teilweise gelöst
Hallo nochmal!

Danke bin schon mal nen schritt weiter. Jetzt sagt er aber, "imcompatible types: TNotifyEvent and Procedure"
Wie kann man dsa beheben

Danke
Björn