Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Format K & SetFocus()
Message
From
05/04/2000 10:41:52
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00355430
Message ID:
00355679
Views:
35
>>The SelectOnEntry should work if you have 5.0 or higher....but there must be something else wrong because the Format K should work also, even if SelectOnEntry is .F. the Format K should highlight the information in field. What type of control is this? Are you loading anything into the keyboard buffer before or after the SetFocus? Does the information get highlighed if you tab into the field instead of doing SetFocus?
>>
>
>TextBox behavior when you Tab into the box differs from the behavior if you mouse-click into the box - I find I need to add code to the GotFocus event to adjust the SelStart and SelLength properties and prevent the native VFP action with a NODEFAULT to make them work identically. The subclass of a typical numeric textbox that I want to give this behavior to looks like:
>
>
PROCEDURE GotFocus()
>   LOCAL uDoDefaultResult
>   uDoDefaultResult = DODEFAULT()
>   WITH this
>      .SelStart = 0
>      .SelLength = 1000
>   ENDWITH
>   NODEFAULT
>   RETURN uDoDefaultResult
>ENDPROC
This is true Ed. The way I understood John's question though is that he is explicitly calling the .SetFocus() method to obtain focus into the control.
The expected result should be the information in the control being highlighted, which doesn't seem to be happening for him. So I was trying to gather more information to help determine what the problem might be. Maybe I have totally misunderstood his question.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform