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:[email protected]] On Behalf Of
Charlie-gm
Sent: Wednesday, November 08, 2017 3:41 PM
To: [email protected]
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]
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message:
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.