Mike Sue-Ping
Cambridge, Ontario, Canada
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
>
Précédent
Suivant
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