Print Page | Close Window

selecting text / setting cursor problem

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Syntax Edit
Forum Description: Topics Related to Codejock Syntax Edit
URL: http://forum.codejock.com/forum_posts.asp?TID=12936
Printed Date: 24 November 2024 at 5:04am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: selecting text / setting cursor problem
Posted By: fuxi
Subject: selecting text / setting cursor problem
Date Posted: 15 December 2008 at 9:30pm
hi all,

i'm trying to do do the following:
- set a text selection in row 12, and from col 20 to 30
- set the cursor to the starting position of this selection (row 12, col 30)

i'm using the following code:

with editor
                .CurrPos.SetPos 12, 20
                With .Selection
                    .Start.SetPos 12, 20
                    .End.SetPos 12, 30
                End With
end with

it should be right - but the problem is:
the cursor appears at the right place but there's no selection :(
if i omit .CurrPos.SetPos it works but i also want the cursor to appear at the selection start.

what could be wrong?

thanks in advance,
fuxi



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net