Highlight Handle, anyone?

  • Thread starter Thread starter Number 11950 - GPEMC! Replace number with 11950
  • Start date Start date
N

Number 11950 - GPEMC! Replace number with 11950

When you highlight a selection of text represented in an object on a form,
somewhere in the Framework or alternatively in the Windows API there exists
an array of variables that either contain as a string the portion of text
before the highlight, in the highlight and after the highlight, or as an
integer or long the beginning and length of the highlighted string or other
related data.

The question is where?
TIA
 
When you highlight a selection of text represented in an object on a form,
somewhere in the Framework or alternatively in the Windows API there exists
an array of variables that either contain as a string the portion of text
before the highlight, in the highlight and after the highlight, or as an
integer or long the beginning and length of the highlighted string or other
related data.

The question is where?
TIA

Look at the properties for the object you are interested in.

For TextBox, SelectedText is the text that is selected, and
SelectionStart and SelectionLength are the index of the start of the
selected text and the length of the selection.
 
Jack Jackson said:
Look at the properties for the object you are interested in.

For TextBox, SelectedText is the text that is selected, and
SelectionStart and SelectionLength are the index of the start of the
selected text and the length of the selection.

What I'm looking at is the web-browser control in design mode. I realise
that this may not be the only control lacking SlectionStart and
SelectionLength properties that I may have to determine highlight boundaries
in, so I am left wondering how it is handled by the Framework or the API...?
 
Back
Top