WindowSelectionChange event returning wrong information

A

Andrew Sharpe

If I catch the WindowSelectionChange event and then check the value of
Sel.Start, it seems to return the right value until you insert an XML Node
from a schema. Then if you move over the characters one by one with the
arrow key, you'll find that the Sel.Start from the WindowSelectionChange
event that fires just after you passed over the XML Node has the wrong value.
Go back and forth over the node, you'll see that the value is always wrong.

Is this a bug or am I missing something? I am using Word 2003 (11.5604.5606).
 
W

Word Heretic

G'day "Andrew Sharpe" <[email protected]>,

There are 'virtual chars' that are not content. Eg, the para mark,
field boundaries, table cell markers etc ad nausem

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice


Andrew Sharpe reckoned:
 
A

Andrew Sharpe

Well if you click instead of using the arrow keys, I think you'll find that
the field boundaries and XML node markers are actually considered one
character each so far as the selection index goes (as long as you have them
shown). Just play around with the event a little, you'll find that the
character just in front of the XML node sometimes comes up as x, and other
times as y, depending on how you got the selection cursor there. Cursoring
back over the node yields a different result than cursoring to the node or
clicking with the mouse.

So I think my question is still...in question.

Andrew
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top