获得控件的名称有一个Form1,里面有一个Button1.在Button1的单击事件中执行 this-Name。得到的Name字符串是
获得控件的名称
有一个Form1,里面有一个Button1.
在Button1的单击事件中执行 this->Name。
得到的Name字符串是Form1的Name。
怎么能在Button1中得到自身的控件名字Button1 。不要直接用Button1来指向。
谢谢大家。
[解决办法]
((TButton*)Sender)->Name
获得控件的名称
有一个Form1,里面有一个Button1.
在Button1的单击事件中执行 this->Name。
得到的Name字符串是Form1的Name。
怎么能在Button1中得到自身的控件名字Button1 。不要直接用Button1来指向。
谢谢大家。
[解决办法]
((TButton*)Sender)->Name