PRB: Unexpected SelStart Property Behavior in Grid's Textbox (132366)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 3.0
This article was previously published under Q132366 SYMPTOMS
When you press the TAB key to move into a grid's text box, the insertion
point is placed at the beginning of the field instead of at the end of the
field even though the Grid1.Column1.SelectOnEntry property is set to false
(.F.), and the Grid1.Column1.Text1.GotFocus event contains this code:
THIS.SelStart = LEN(ALLTRIM(THIS.Value))
CAUSE
The insertion point is always placed at the beginning of the text in row
one, column one (R1C1) of the grid when you move to the grid from another
object. This is by design.
The text box in the grid column handles resetting the selection or
select-on-entry in its default GotFocus method. The grid column tells the
text box about its SelectOnEntry property.
WORKAROUND
Add the code shown in the "Example Workaround" section of this article.
STATUS
This behavior is by design.
Modification Type: | Major | Last Reviewed: | 2/15/2000 |
---|
Keywords: | KB132366 |
---|
|