Jump to content


Photo

Control, Highlight


  • Please log in to reply
1 reply to this topic

#1 beardboy

beardboy
  • Members
  • 443 posts

Posted 20 August 2004 - 01:34 PM

Is something like this possible with the Control command?

Highlight[, Count]: Highlights the text of an Edit Control. Count is the number of characters to highlight, by default it highlights from left to right, but you can have it highlight Right to left. Enter A to highlight all the text.

Control, Highlight, 5, Edit1 ; Highlights the first 5 letters from left to right.
Control, Highlight, L5, Edit1 ; Highlights the first 5 letters from left to right.
Control, Highlight, R5, Edit1 ; Highlights the first 5 letters from right to left.
Control, Highlight, A, Edit1 ; Highlights all the text in Edit1.

thanks,
beardboy

#2 Chris

Chris
  • Administrators
  • 10727 posts

Posted 20 August 2004 - 02:46 PM

Since it's related to an item already on the list, I've added it to that item: "Support for moving the caret in an Edit control, and optionally selecting part of the text (if possible)." Thanks for the idea.

Note that you can use ControlGet to retrieve the text in an edit's current selection. It can also retrieve an entire line.