trichview.com

trichview.support




GetSelectionBounds returns odd result in table


Return to index


Author

Message

Martin Holmes

Posted: 06/24/2004 15:25:35


Hi there,


I'm using GetSelectionBounds to try to find the style(s) of items in

selected text. This works fine outside tables with any selection length

(including no selection), but when the selection length is zero but the

cursor is an a table cell I get weird results. Here's the line of code:


   RVE.TopLevelEditor.GetSelectionBounds(StartItemNo, StartItemOffs,

                     EndItemNo, EndItemOffs, True);


and these are the results I get:


StartItemNo: -1

StartItemOffset: 2006815328

EndItemNo: -1

EndItemOffset: 1242512


Any idea what the problem might be? The code is called by a click on a

button, so the focus has left the editor; is it possible that this

destroys the top level editor for the table cell, and leaves the cursor

nowhere at all? If so, is there a way I can prevent that from happening?


All help appreciated,

Martin





Powered by ABC Amber Outlook Express Converter