Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SelectOnEntry/GotFocus
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
SelectOnEntry/GotFocus
Miscellaneous
Thread ID:
00583553
Message ID:
00583553
Views:
50
When the cursor (your blinking one) is moving through textboxes, you can set the SelectOnEntry property to .T. and set your format property to 'K' to have FoxPro display a selection over the data within the control.

When the below code is placed in the GotFocus Event, it takes care of selecting everything within the control, whether the field/control is empty or not, when the control contains Character or Date data type data. However, it does not seem to work for numeric data fields. Anyone know how to make this work for numeric data?

Textbox::GotFocus()
This.SelStart=0
This.SelLength=This.MaxLength
NODEFAULT

Of course, I have set the MaxLength to the length of the field in each case for the text controls.

Thanks,

Cecil
(a Texan out of his State)
Next
Reply
Map
View

Click here to load this message in the networking platform