Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid Cells and Selecting Text
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00798578
Message ID:
00799015
Views:
36
Thank you for the help.

Likewise, what I am trying to accomplish [and I'm almost there] is to have the text box in the grid to be selected up entry of the field. As an example; I enter the first record and go to the end and hit enter/tab. A second record is created dynamically and the focus is set to the third colum field. I want that field and the others after it to be selected upon entering into the field. I believe with the code you sent, it would just take putting the code into the correct methods. I have tried the click event and it works like I want it. I also put into the When event, but doesn't give the result I am looking. Your assistance is greatly appreciated.

Thanks

>First, you want to make sure the textbox's SelectOnEntry is .T. In the click of the textbox put:
>
>if this.parent.class = 'Column' and this.SelectOnEntry
>   dodefault()
>   This.SelStart = 0
>   This.SelLength = 999
>   NODEFAULT
>endif
>
>In the GotFocus of the textbox, put:
>
>if this.SelectOnEntry
>   dodefault()
>endif
>
>>Fox Grid Masters~
>>
>>I have a grid that allows the user(s) to enter data dynamically. After entering the [first] record, the user hits enter or tab at the last field, and a new duplicate record is created.
>>
>>Here's the question, the second+ records I want to have the field highlighted and all its text selected so the user(s) can type over it or tab through to the next data element of the record. What code can accomplish this and what event should handle the code?
>>
>>Thanks in advance
>>ML
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform