Print Page | Close Window

Selected text

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=9392
Printed Date: 24 November 2024 at 3:14pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Selected text
Posted By: XpatTech
Subject: Selected text
Date Posted: 23 January 2008 at 7:07am
Struggling abit trying to understand the NormalStart/NormalEnd.

I need to be able to strip out a block of text and replace it with another block of text using code. Anyone out there able to give me an example of how to do this.



Replies:
Posted By: AndreiM
Date Posted: 23 January 2008 at 7:48am
The selection start may be grater then end - reverse selection.
NormalStart returns less value from Start and End.
NormalEnd returns bigger value from Start and End.
 
Selection.Text property is read/write.
 
EXAMPLE:
    wndSyntaxEdit.Selection.Start.SetPosStr 1, 3
    wndSyntaxEdit.Selection.End.SetPosStr 2, 5
    wndSyntaxEdit.Selection.Text = "1234567"
 
See the SyntaxEditTextSelection description in our help.
 


-------------
Regards,
Andrei Melnik


Posted By: XpatTech
Date Posted: 23 January 2008 at 8:01am
Thanks member_profile.asp?PF=3233&FID=48 - AndreiM , exactly what I needed...



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