Information générale
Catégorie:
Gestionnaire d'écran & Écrans
>>>I have a form with a small command button nexto a textbox. (The textbox will be used to enter a search string).
>>>
>>>When the command button is clicked, I want the cursor to move into the begining of the textbox, so that the user can type the text (without having to click in the textbox with the possibility of clicking somewhere in the center.)
>>>
>>>(In FPW I used the code: _curobj = objnum(objectname) in the VALID code area, and this would highlight the textbox so that it was ready to accept typing )
>>
>>You'll want to use the setfocus method of the object.
>
>I'm new to VF5. What string of code must I type? Must I put it in the command button click event?
In the click event of the button put something like this:
thisform.txtSearch.setfocus()
where txtSearch it the name of your text box
You can also set the SelectOnEntry propertery of the box to .t. so that the user
can type right over the text.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement