Ernesto_Paez
MIS
Hi Guys,
I know when creating a form manually, i can put in the form active event the following to allow the txtbox to setfocus when the form open, as follow
Thisform.txtTextBox.setfocus
ok now i am writing code to create a form, a txtbox, label, grid etc but don't how to write code to make the txtbox to setfocus, when the form open
can anyone indicate Please ?
see below what i have done
Just need to know, how to write code, to allow the textbox to setfocus, when the form open
Thanks a lot
I know when creating a form manually, i can put in the form active event the following to allow the txtbox to setfocus when the form open, as follow
Thisform.txtTextBox.setfocus
ok now i am writing code to create a form, a txtbox, label, grid etc but don't how to write code to make the txtbox to setfocus, when the form open
can anyone indicate Please ?
see below what i have done
Code:
Local oForm
oForm = Createobject('myForm')
oForm.Show(2)
Read Events
Define Class myForm As Form
Height = 250
Width = 300
AutoCenter = .T.
Caption = 'Search Vendor Names'
ShowTips = .T.
showWindow = 2
Add Object label1 As Label With ;
top = 15,;
left = 8,;
caption = 'Enter Po# ',;
Backstyle = 0
Add Object Text1 As TextBox With ;
top = 15,;
left = 125,;
Height = 23,;
Width = 80,;
value = '',;
ToolTipText = 'Start typing to search matching records,'+;
' Double-click to clear search '
Procedure Text1.DblClick
This.Value = ''
This.InteractiveChange()
Endproc
and so on
Thanks a lot