Information générale
Catégorie:
Gestionnaire d'écran & Écrans
>>Hello everybody-
>>A quick question for the sages. How can I best trap the backspace key in a textbox so that after the text is fully deleted the textbox does not lose the focus? I only want the focus to move to the previous control by using the mouse or shift-tab.
>
>But its possible to position yourselft at the front of the text box without deleting all the text and hit Backspace. You'd need to know your cursor position within the textbox.
Use the selstart. If its pointing to 0 then you know that the next backspace will take you to the previous field. Just add the logic to Bill Caton's suggestion.
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