I did it with both the textbox settings, and using the GotFocus, LostFocus, and MouseUp events.
The class gets a new property IsActive = .F.
GotFocus: IF NOT MDOWN() THIS.IsActive = .T. ENDIF
MouseUp: IF NOT THIS.IsActive and THIS.SelLength = 0 THIS.SelStart = 0 THIS.SetLength = LEN(RTRIM(THIS.Text)) ENDIF THIS.IsActive = .T.
LostFocus: THIS.SelStart = 0 THIS.IsActive = .F.
If a user clicks into and highlights a portion of the text. I leave it selected.
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Charlie-gm Sent: Wednesday, November 08, 2017 3:41 PM To: profoxtech@leafe.com Subject: Re: Textbox Highlighting
On 11/8/2017 3:25 PM, Ted Roche wrote:
[snip]
KEYBOARDing is an inelegant solution: it depends on the Edit menu being available the default Ctrl+A menu shortcut defined.
Just a quick aside, the Keyboard stuffing of Ctrl+A does not require the edit menu to be available, nor shortcut be defined. I think that holds true for all the KEYBOARD "labels" that VFP defines.
-Charlie
[excessive quoting removed by server]