设置光标焦点 [英] Set Cursor Focus
本文介绍了设置光标焦点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个函数。在函数(Function1)中的一部分逻辑中,我调用了Function2(x)
I have a Function. In a part of the logic within this Function (Function1) I have a call to Function2(x)
将变量x传递给这个新函数形成。 (frmexample)
This passes variable x into this new function (Function2) and opens a form. (frmexample)
如何设置光标在特定文本框中加载?
How can I set the cursor to load in a particular text box? At the moment by default when the form loads, the cursor is in the first textbox on the form.
我尝试过:
frmexample.txtputcursorinthisbox.SetFocus
不工作,标签索引为31,也许有一种方法使用此信息来更正光标放置?
Which doesn't work, the tab index is 31, perhaps there is a way to use this information to correct the cursors placement?
谢谢!
推荐答案
我在错误的地方 - 在我之前(frmexample.show)
I had this in the wrong place - before I (frmexample.show)
frmexample.txtputcursorinthisbox.SetFocus
这篇关于设置光标焦点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文