Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / June 2005

Tip: Looking for answers? Try searching our database.

WindowSelectionChange event returning wrong information

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Andrew Sharpe - 09 Jun 2005 19:28 GMT
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).
Word Heretic - 11 Jun 2005 16:01 GMT
G'day "Andrew Sharpe" <AndrewSharpe@discussions.microsoft.com>,

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:

>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
[quoted text clipped - 4 lines]
>
>Is this a bug or am I missing something?  I am using Word 2003 (11.5604.5606).
Andrew Sharpe - 14 Jun 2005 14:50 GMT
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

> G'day "Andrew Sharpe" <AndrewSharpe@discussions.microsoft.com>,
>
[quoted text clipped - 16 lines]
> >
> >Is this a bug or am I missing something?  I am using Word 2003 (11.5604.5606).

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.