We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

programatic cursor

How can I set the cursor in the syntax editor to appear at a specified line and column programatically?

4 Replies

AD Administrator Syncfusion Team November 1, 2005 03:44 PM UTC

Hi Bill, You could use the CurrentPosition property or a combination of CurrentLine and CurrentColumn properties in the EditControl for this purpose : this.editControl1.CurrentPosition = new Point(7,10); OR this.editControl1.CurrentColumn = 10; this.editControl1.CurrentLine = 7; I have attached the latest copy of Essential Edit Users Guide here. Please refer to the sub-section - Positions and Offsets under Features in the users guide for more information in this regard. Let me know if you need any other information. We appreciate your interest in Essential Edit. Regards, Guru Patwal Syncfusion, Inc.


BB Bill Brennan November 1, 2005 04:49 PM UTC

I reviewed the section you referred me to, but I''m affraid I''ve already tried this. I have several docked windows in a form and when I handle an event from a seperate docked window I want the cursor to show up in the editor at a specific line. I tried activating the docking window and the tab containing the editor and then setting the line at which the cursor should appear, but this doesn''t work. Any suggestions? >Hi Bill, > >You could use the CurrentPosition property or a combination of CurrentLine and CurrentColumn properties in the EditControl for this purpose : > >this.editControl1.CurrentPosition = new Point(7,10); > >OR > >this.editControl1.CurrentColumn = 10; >this.editControl1.CurrentLine = 7; > >I have attached the latest copy of Essential Edit Users Guide here. Please refer to the sub-section - Positions and Offsets under Features in the users guide for more information in this regard. Let me know if you need any other information. We appreciate your interest in Essential Edit. > >Regards, >Guru Patwal >Syncfusion, Inc.


BB Bill Brennan November 1, 2005 05:39 PM UTC

I figured this out. I wsa using the selected method to activate the control instead of focus. What is the difference? >I reviewed the section you referred me to, but I''m affraid I''ve already tried this. I have several docked windows in a form and when I handle an event from a seperate docked window I want the cursor to show up in the editor at a specific line. I tried activating the docking window and the tab containing the editor and then setting the line at which the cursor should appear, but this doesn''t work. Any suggestions? > >>Hi Bill, >> >>You could use the CurrentPosition property or a combination of CurrentLine and CurrentColumn properties in the EditControl for this purpose : >> >>this.editControl1.CurrentPosition = new Point(7,10); >> >>OR >> >>this.editControl1.CurrentColumn = 10; >>this.editControl1.CurrentLine = 7; >> >>I have attached the latest copy of Essential Edit Users Guide here. Please refer to the sub-section - Positions and Offsets under Features in the users guide for more information in this regard. Let me know if you need any other information. We appreciate your interest in Essential Edit. >> >>Regards, >>Guru Patwal >>Syncfusion, Inc.


AD Administrator Syncfusion Team November 2, 2005 01:40 AM UTC

Hi Bill, Thanks for the update. We are glad that you could work around this problem. Basically the Select and Focus methods in the EditControl should do the same task. I have created a test sample as per my understanding of your specifications and have attached it here. Please modify the sample to show this issue and send it back to us. We will further investigate it here and suggest an appropriate solution. We appreciate your cooperation. Regards, Guru Patwal Syncfusion, Inc.

Loader.
Live Chat Icon For mobile
Up arrow icon