Autor Beitrag
Killmag10
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 297

Suse Linux / DOS / Windows All In One ;)
D4 / D2005
BeitragVerfasst: Di 18.05.04 20:31 
Hi

Weis nehmand wie es geht das man den Hint des senders in einen edit anzeigen kann der die procedure aufgerufen hatt.

weil

edit1.text:=sender.hint;

geht ja schlecht


mfg. Killmag10

_________________
Mega-inkompetente Computer-ruinierende Organisation spioniert ohne funktionierende Technik
Raphael O.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1596


VS 2013
BeitragVerfasst: Di 18.05.04 20:49 
wenn den Typ des senders (z.B. button) weißt, dann funktioniet es so:
ausblenden Delphi-Quelltext
1:
edit1.text:=TButton(sender).Hint;					
Killmag10 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 297

Suse Linux / DOS / Windows All In One ;)
D4 / D2005
BeitragVerfasst: Di 18.05.04 20:55 
Fiji-Fighter hat folgendes geschrieben:
wenn den Typ des senders (z.B. button) weißt, dann funktioniet es so:
ausblenden Delphi-Quelltext
1:
edit1.text:=TButton(sender).Hint;					


danke, nochwas... wie kann ich überprüfen ob es auch ein TButton ist ?

_________________
Mega-inkompetente Computer-ruinierende Organisation spioniert ohne funktionierende Technik
Raphael O.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1596


VS 2013
BeitragVerfasst: Di 18.05.04 20:58 
sollte mit "sender.classname" herauszufinden sein...
Motzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2931

XP Prof, Vista Business
D6, D2k5-D2k7 je Prof
BeitragVerfasst: Di 18.05.04 21:24 
Naja.. Die richtige Vorgehensweise wäre eine Überprüfung mit is
ausblenden Delphi-Quelltext
1:
2:
if Sender is TButton then
  Edit1.Text := TButton(Sender).Hint;

_________________
gringo pussy cats - eef i see you i will pull your tail out by eets roots!
Raphael O.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1596


VS 2013
BeitragVerfasst: Di 18.05.04 21:25 
Motzi hat folgendes geschrieben:
Naja.. Die richtige Vorgehensweise wäre eine Überprüfung mit is

höchstens die elegantere ;)
Motzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2931

XP Prof, Vista Business
D6, D2k5-D2k7 je Prof
BeitragVerfasst: Di 18.05.04 21:56 
Nein.. denn ich kann auch meinen eigenen Nachfahren von TButton basteln der dann von mir aus TMyButton heißt. Mit deiner Classname-Methode wird dieser Button nicht als Button erkannt, während der is-Operator prüft ob Sender ein Nachfahre von TButton ist und damit auch meinen TMyButton korrekt als TButton erkennt..!

_________________
gringo pussy cats - eef i see you i will pull your tail out by eets roots!
Killmag10 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 297

Suse Linux / DOS / Windows All In One ;)
D4 / D2005
BeitragVerfasst: Di 18.05.04 22:29 
machs mit

ausblenden Delphi-Quelltext
1:
if sender is döner then essen;					


Hauptsache es geht, danke nochmal :wink:

_________________
Mega-inkompetente Computer-ruinierende Organisation spioniert ohne funktionierende Technik