I have a grid which allows users to enter figures into one of the columns (I've heard that user entry grids are a nightmare, but I have no choice in the matter!). I would like to have it so that when my user enters that column (whether clicking or tabbing) all the text within that cell is selected.
I've tried using:
I've also tried using this in the gotfocus event:
but none of these seem to work.
Marcia's post here (thread1254-820709) gives exactly the behaviour I'm looking for in a standalone textbox (on the gotfocus event):
but when I'm working with a textbox within a column (within a grid) it doesn't work. I notice that format and selectonentry apply to both textboxes and columns - am I right in thinking that the column would take precedence in this situation? Any ideas how I can get the Marcia's excel type behaviour in a grid?
I've tried using:
Code:
format = 'k'
Code:
selectonentry = .t.
Code:
.SelStart = 0
.SelLength = LEN(This.Text)
Marcia's post here (thread1254-820709) gives exactly the behaviour I'm looking for in a standalone textbox (on the gotfocus event):
Code:
WITH This
IF .SelectOnEntry
TextBox::GotFocus()
.SelStart = 0
.SelLength = LEN( This.Text )
NODEFAULT
ENDIF
ENDWITH