Sender,self代表什么,什么时候用
解决方案 »
- delphi 键盘上的键值
- delphi中有没有什么表格组件可以合并单元格?
- DENSO数据扫描器软件!
- 一个常出现的错误,请问怎么纠正?
- 第三方皮膚倥作:VCLSkin問題
- 三层问题,win2000做的应用程序服务器,在98的客户端程序用socket连接,说没有注册类别?
- 请问Cardinal类型怎么样转换其它类型,例如Integer或者Long之类?
- TStringList.AddObject中的两个参数是干什么的????????????????????
- 各位大哥有点小问题,咨询一下!!!!
- 下面这段老出错
- 请问买一套正版的delphi8,一般是多少钱???不要企业版的,谢谢!!!
- 怎么得到程序自身所在的路径?
Sender可以指任何一个控件。
Sender指代当前引发的事件的控件本身。
在一个单元里用时,即表示本单元的窗体(控件)本身,在单元里用self.时,本窗体的所有控件名,属性等都会列出来。
sender是指你操作的控件
如在一个控件的双击事件中TfrmMain.Button1Click(Sender: TObject);
sender 就是Button1
*****************************************************
In an event handler, the Sender parameter indicates which component received the event and therefore called the handler. Sometimes it is useful to have several components share an event handler that behaves differently depending on which component calls it. You can do this by using the Sender parameter in an if...then...else statement. For example, the following code displays the title of the application in the caption of a dialog box only if the OnClick event was received by Button1.procedure TMainForm.Button1Click(Sender: TObject);
begin
if Sender = Button1 then
AboutBox.Caption := 'About ' + Application.Title
else
AboutBox.Caption := '';
AboutBox.ShowModal;
end;
********************************************************************
我想这些E文你能看得懂吧。
,主要由内存地址体现
Sender指代当前引发的事件的控件本身
sender 是他.