如下代码: indexfocus := self.ActiveControl.ComponentIndex + 1; if indexfocus = self.ActiveControl.ComponentCount then
indexfocus := 0;
twincontrol(form.Controls[indexfocus]).SetFocus;
end;
如果是delphi中带的自身控件判断起来没有问题,可是使用第三方控件后,就不好使了?代码中的 self.ActiveControl.ComponentIndex 无法获取,甚至连控件的name都获取不了!请问这是为什么啊?
朋友们帮帮忙!
indexfocus := 0;
twincontrol(form.Controls[indexfocus]).SetFocus;
end;
如果是delphi中带的自身控件判断起来没有问题,可是使用第三方控件后,就不好使了?代码中的 self.ActiveControl.ComponentIndex 无法获取,甚至连控件的name都获取不了!请问这是为什么啊?
朋友们帮帮忙!
解决方案 »
- RzSpliter中的RzGroupBar显示问题
- createwindow后window也显示了,怎么样才可以修改dwStyle(WS_OVERLAPPEDWINDOW or WS_VSCROLL)。
- 这个sql语句如何写?非高手莫进。
- 想用delphi写一个服务端,像"美萍VOD点播系统"一样,服务端是个可执行文件,可以运行,可以设置,我不要求有流解析,只要能在里面添加文
- 一个字符串长度越界攻击的例子,求解决方法
- 哪有介绍delphix的文章下载啊,我的英语水平实在不怎么样,那个help看不懂啊!
- 關于兩層結構問題
- 如何实现与电视字幕广告一样的从左至右平滑移动效果?
- 我是一个初学者,望高手指教!
- 制作ADO程序,如何发布?
- 含小数点的字符串转换为数值型
- 线程问题,tserversocket和tclientsocket问题
SendMessage(Handle, WM_NEXTDLGCTL, 0, 0);
大虾可以说说吗?
wCtlFocus = wParam; // identifies control for focus
fHandle = (BOOL) LOWORD(lParam); // wParam handle flag
ParameterswCtlFocusValue of wParam. If the fHandle parameter is TRUE, the wCtlFocus parameter identifies the control that receives the focus. If fHandle is FALSE, wCtlFocus is a flag that indicates whether the next or previous control with the WS_TABSTOP style receives the focus. If wCtlFocus is zero, the next control receives the focus; otherwise, the previous control with the WS_TABSTOP style receives the focus. fHandleValue of lParam. Contains a flag that indicates how Windows uses the wCtlFocus parameter. If the fHandle parameter is TRUE, wCtlFocus is a handle associated with the control that receives the focus; otherwise, wCtlFocus is a flag that indicates whether the next or previous control with the WS_TABSTOP style receives the focus. 焦点移出的时候拉回来
procedure TForm1.Edit1Exit(Sender: TObject);
begin
if Edit1.Text <> 'Zswang' then Edit1.SetFocus;
end;