自动选择 Text 的内容
敬业的IT人
互联网
佚名
2008-1-8 14:58:23
在使用 VFP 的应用进行录入时,每进入一个录入框,就自动选择该框中的所有内容。利用以下的代码,也可实现类似的功能。
Private Sub MyTextBox_GotFocus()
AutoSelect MyTextBox
End Sub
Sub AutoSelect(SelObject As Control)
SelObject.SelStart = 0
If TypeOf SelObject Is MaskEdBox Then
SelObject.SelLength = Len(SelObject.FormattedText)
Else
If TypeOf SelObject Is TextBox Then
SelObject.SelLength = Len(SelObject.Text)
End If
End If
End Sub
- 最新文章
- 获取网络上的用户名[01-08]
- Visual FoxPro9.0浏览修改数据图解[01-08]
- 用VFP批量打印信封[01-08]
- 在VFP 6.0利用API函数调用Windows格式化磁盘界..[01-08]
- 数据挖掘技术简介[01-08]
- VFP编辑框中实现自动更正的方法[01-08]
- 相关文章
