Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Format K & SetFocus()
Message
From
05/04/2000 10:20:45
 
 
To
05/04/2000 08:51:57
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00355430
Message ID:
00355662
Views:
22
>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
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform