Comment/Uncomment Lines Behavior

SyntaxEditor for Windows Forms Forum

Posted 12 years ago by Rick - Developer, Visual Software Systems LLC
Version: 4.0.0270
Avatar
Is there a way to prevent SyntaxEditor from selecting the entire line and moving the caret to the end of the line when using the CommentLines and UncommentLines commands? I'd like this to behave like VS.Net does -- the line gets commented or uncommented but the relative caret position and the selection remains unchanged.

Thanks... Rick

Comments (9)

Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Rick,

I'm not seeing this behavior, it seems to be working like VS when I try. Could you give the steps to repro it in the SDI Editor sample? Thanks!


Actipro Software Support

Posted 12 years ago by Rick - Developer, Visual Software Systems LLC
Avatar
In the sample SDI application, type some text one or more lines. Put the caret anywhere within one of those lines of text (selection size doesn't matter) and click the comment button on the toolbar. What I see is that the line gets commented, fully selected, and the cursor is moved to the last position on the line. I see this behavior on both Vista 64-bit and XP 32-bit
Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Sorry Rick, I wasn't looking at the correct thing. I think I needed a coffee! :)

Yes I see what you mean and will add it to the TODO list to try and change this.


Actipro Software Support

Posted 12 years ago by Rick - Developer, Visual Software Systems LLC
Avatar
Thanks. Any idea as to timing?

Rick
Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Not sure at this point Rick, we have a lot of high priority things on our plate right now but will try and get to this.


Actipro Software Support

Posted 7 years ago by James Sconfitto - Exele Information Systems, Inc.
Avatar

i'm experiencing the same behavior in the Windows Forms editor. Is there any way to modify this behavior? Or am i doing something wrong?

Posted 7 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi James,

Unfortunately we don't have a way to modify that at this time.  In the newer WPF version's code we have a much better way of doing many text changes in a single transaction while still tracking how the selection gets adjusted along the way.  So in that version, it works like Visual Studio.  We hope to eventually port that newer design back to WinForms.


Actipro Software Support

Posted 7 years ago by James Sconfitto - Exele Information Systems, Inc.
Avatar

Thanks for letting me know. Mind telling me if this becomes available in the WinForms control?

We don't plan on updating to the WPF form for a while.

Posted 7 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi James,

Keep an eye on our blog since we post all our release notes there.  You'd want to watch for something where we talk about porting our newer WPF SyntaxEditor object model back to WinForms.  We currently are still adding some ancillary features to the WPF version that are in the WinForms version.  Once we get through that, the back port will be possible.


Actipro Software Support

The latest build of this product (v2020.1 build 0400) was released 24 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.