Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Editbox with preselected text
Message
De
13/08/2001 14:48:55
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Editbox with preselected text
Divers
Thread ID:
00543191
Message ID:
00543191
Vues:
50
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.

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?

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform