表单中有多个Button,怎么最好的判断其中哪个被选中?而如果有一个字符=‘10’;怎样就对Button10进行处理?
解决方案 »
- 自动更新问题,怎样覆盖自身?
- 请帮忙把VBScript 代码翻译成delphi 一下,谢谢!
- 很奇怪哦!俺在窗体上放个frReport1 再放个Button1 ,执行一下frReport1.ShowReport;,都居然连预览都不出来!!怎么办的?
- delphi里怎样终止一个外部程序运行啊?
- Delphi程序员请关注一下------在线等待
- 关于fastreport的一个难题
- 如何计算年龄
- Delphi有没有判断类型的函数?
- 如何制作用鼠标拖动子窗体的效果
- 急急急,如何用Query对lookup进行查询?????
- 怎样取到两个日期差多少天?
- WebSnap中如何由Web App Debugger executable 类型转成ISAPI/NSAPI Dynamic Link Library类型?
if Button1.Focused=true then
begin
end;第二个问题,可以用case语句来作吧,哈哈。
if (self.Components[i] is TButton)and
(TButton(self.Components[i]).Focused) then
showmessage(TButton(self.Components[i]).Name);
s: string;
AButton : TButton;
begin
s := '10';
AButton := self.FindComponent('Button'+s) as TButton;
end;//你测试一下吧,我还没来得及测试