Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SelectOnEntry in Textbox
Message
 
À
03/12/2003 09:50:54
Mike Sue-Ping
Cambridge, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00855187
Message ID:
00855422
Vues:
20
Ah, yes, that scrolling was exactly what I was observing too. But that scrolling happens in other applications too, for example in Windows shortcut properties which Target textbox contains a long file path.

>Nick,
>
>KEYBOARDing a CTRL+A did the trick! Thanks.
>
>Just to be sure that we were seeing the same thing, let me try to explain what I observed when using the SELSTART and SELLENGTH method.
>
>I have a textbox with a controlsource set to a character field of say, C(25) and the current field's content is "abc". The textbox's width is such that not all of the field's content can be displayed...the user must scroll horizontally to see it all. Initially, the textbox displays "abc". When I click in the textbox (with your code in the MouseDown()/Up() events) the entire contents are selected as expected, however, the textbox now displays what appears to be a highlighted empty string. This is because "abc" is now scrolled off to the left and the highlighted empty string is the last part of the field's contents ("abc" plus 22 spaces). The user would think that they just lost the original textbox value when in fact they didn't; they just don't realize it is out of the textbox "window".
>
>Hope this makes sense to you.
>
>Thanks again for the alternative.
>
>Regards,
>
>Mike.
>
>
>>I don't see it happening in my code. My test selected the whole value that was longer than textbox width.
>>
>>However, another way to achieve this in the same CASE statement would be:
>>CASE THIS.SELLENGTH = 0
>>KEYBOARD '{CTRL+A}' PLAIN
>> * THIS.SELSTART = 0
>> * THIS.SELLENGTH = 1000
>>
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform