有没有PB的那种,点哪个控件就是this.name这类的写法? 有没有PB的那种,点哪个控件就是this.name这类的写法? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 不知你要干吗,delphi中用,控件点击事件中的参数sender就是他本身 写不出来,你写一个我看一下?在radionbutton的click里写的t :=TcxRadioButton(Sender).Caption;这样我这取到的怎么成了窗体的caption unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, Menus, cxLookAndFeelPainters, StdCtrls, cxButtons, cxRadioGroup;type TForm1 = class(TForm) cxRadioButton1: TcxRadioButton; procedure cxRadioButton1Click(Sender: TObject); private { Private declarations } public { Public declarations } end;var Form1: TForm1;implementation{$R *.dfm}procedure TForm1.cxRadioButton1Click(Sender: TObject);var s:string;begin s:=(TcxRadioButton(Sender).Caption); ShowMessage(s); //s等於cxRadioButton1;end;end. 開始以為你要類別pb的那種this.name的寫法如果是組件本身,可以用sender對象定義...unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, Menus, cxLookAndFeelPainters, StdCtrls, cxButtons, cxRadioGroup;type TForm1 = class(TForm) cxRadioButton1: TcxRadioButton; procedure cxRadioButton1Click(Sender: TObject); private { Private declarations } public { Public declarations } end;var Form1: TForm1;implementation{$R *.dfm}procedure TForm1.cxRadioButton1Click(Sender: TObject);var s:string;begin s:=(TcxRadioButton(Sender).Caption); ShowMessage(s); //s等於cxRadioButton1;end;end. delphi 表格信息的调入 如何快速查询 没有刻录(Burned=0)、排在最前面(按ID排序)的数据大小之和(sum(size))小于或等于光盘容量的所有记录 如何增加控件的OnMouseDown和OnMouseUp事件 初学者的ado问题,高手指点。 那里有delphi的好的教程或视频教程 下载 如何将时间变量加上10秒? 一个简单的问题 我想在一定时间内向一个IE窗口中的超链点击,大家有什么算法可提供?100分救解。 这里有MM程序员吗??? 关于从ini文件里读写数据的问题 delphi 文件流中查找字符串 读卡器-------------------------会员卡 类型
在radionbutton的click里写的
t :=TcxRadioButton(Sender).Caption;
这样我这取到的怎么成了窗体的caption
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Menus, cxLookAndFeelPainters, StdCtrls, cxButtons, cxRadioGroup;type
TForm1 = class(TForm)
cxRadioButton1: TcxRadioButton;
procedure cxRadioButton1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.dfm}procedure TForm1.cxRadioButton1Click(Sender: TObject);
var
s:string;
begin
s:=(TcxRadioButton(Sender).Caption);
ShowMessage(s);
//s等於cxRadioButton1;
end;end.
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Menus, cxLookAndFeelPainters, StdCtrls, cxButtons, cxRadioGroup;type
TForm1 = class(TForm)
cxRadioButton1: TcxRadioButton;
procedure cxRadioButton1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.dfm}procedure TForm1.cxRadioButton1Click(Sender: TObject);
var
s:string;
begin
s:=(TcxRadioButton(Sender).Caption);
ShowMessage(s);
//s等於cxRadioButton1;
end;end.