Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Editbox with preselected text
Message
 
 
À
13/08/2001 14:48:55
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00543191
Message ID:
00543199
Vues:
23
>I'm writing a wrapper around some code snippets which are held in memo fields, and exported and compiled on as-needed basis. There's an editor screen which has all it takes, and it all works except one thing: the 'Compile' button checks for the existence of the .err file, reads the file, looks for the number of the line with the error, calculates its position in the .prg, and then opens a small modal form with just an editbox, Ok and Cancel button.
>
>The part which doesn't work is trying to have the line with the error highlighted as the Modify Command or method editing window does. Checking in the debugger, the SelStart and SelLength properties are set right, and the text is highlighted properly, but when the editbox actually gets the focus, the line is not highlighted anymore, and the cursor is just before the first character.
>

Where do you set those properties? Does this EditBox class have code in GotFocus(), When() methods?

>If I tab (actually ctrl+tab) out of the editbox, and backtab into it, the focus goes to the offending line just fine. I tried setting focus to the OK button first, and issuing a Keyboard "{backtab}", still no dice.
>
>Did anyone have some success in setting the focus to the editbox with pre-selected text, without the text being unselected once the focus gets there?
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform