TextSelection.MoveToDisplayColumn
(1)
TextSelection.ActivePoint
(1)
MoveToDisplayColumn
(1)
VirtualPoint
(1)
ModelMaker
(1)
Sanders
(1)
Eric
(1)
Charcters
(1)
How to move IDE cursor into virtual space - beyond EOL
Asked By Gerrit Beuze
12-Aug-09 05:36 AM
Hi all,
Inside a VS2005 addin I am trying to position the cursor beyond EOL into virtual space with
TextSelection.MoveToDisplayColumn(line, column, false);
But in if column > number of charcters in th eline, this always fails with
an argument not in expected range exception.
IOW: I am not able to move the cursor beyond EOL.
The VirtualPoint-s as returned TextSelection.ActivePoint etc *do* return the
actual virtual position when beyond EOL, but these properties are read-only.
Any idea if / how this can be done?
Thanks in advance,
Gerrit Beuze
ModelMaker Tools
"Gerrit Beuze" wrote:I am not entirely sure, but maybe you need to enable
Asked By Alex Blekhman
12-Aug-09 06:05 AM
I am not entirely sure, but maybe you need to enable virtual space
for the code editor in VS settings before you try to move the
carret beyond EOL.
Alex
Yes, that is obvious ;-)but there is no method in DevEnv classes to move into
Asked By Gerrit Beuze
12-Aug-09 06:52 AM
Yes, that is obvious ;-)
but there is no method in DevEnv classes to move into this space.
Gerrit Beuze
ModelMaker Tools
"Gerrit Beuze" wrote:Hello Gerrit,I am working on the same issue.
AiR_GuNNeR replied to Gerrit Beuze
15-Sep-09 03:26 PM
Hello Gerrit,
I am working on the same issue. I am porting over a utility dll I use for
my own coding written in C++ for MSVC 6.0 to VS2008 using C#. Did you ever
figure out how to do this? The only way I can figure out around this issue
is to append spaces to each line within the column select range, and then
perform the MoveToDisplayColumn command. It seems kind of kludgy doing it
this way however.
Eric Sanders
Hi Eric,No, except adding whitespace as you found too.
Gerrit Beuze replied to AiR_GuNNeR
16-Sep-09 02:39 AM
Hi Eric,
No, except adding whitespace as you found too.
In my particular case I could check if I was going to move to an empty line
and depending on that use a different approach for what I was trying to do.
Gerrit Beuze
ModelMaker Tools