PRB: Unexpected SelStart Property Behavior in Grid's TextboxID: Q132366 The information in this article applies to:
SYMPTOMSWhen 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:
CAUSEThe 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.
WORKAROUNDAdd the code shown in the "Example Workaround" section of this article.
STATUSThis behavior is by design.
MORE INFORMATION
Steps to Reproduce Behavior1. Issue the following commands in the Command window:
2. Add a text box to the form.
3. Add a grid to the form, and set the following properties:
4. In the Grid1.Column1.Text1.GotFocus event, type this code:
5. Save and run the form.
6. Press the TAB key to move from the text box to the grid. The insertion point is placed at the beginning of the text in row one, column one (R1C1) of the grid.
Example WorkaroundTo place the insertion point at the end of the text, do the following: 1. Issue this command:
2. In Grid1.Column1.Text1.GotFocus event, type these commands:
3. Save and run the form.
4. Press the TAB key to move from the text box object to the grid object. Additional reference words: 3.00 VFoxWin selection
KBCategory: kbui kbprb
KBSubcategory: FxotherGeneral
|
Last Reviewed: July 28, 1995 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |