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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

FindRange with search up option

Thread ID:

Created:

Updated:

Platform:

Replies:

60455 May 4,2007 09:44 PM UTC May 10,2007 09:15 PM UTC WinForms 2
loading
Tags: EditControl
Craig Timmerman
Asked On May 4, 2007 09:44 PM UTC

I can't seem to make FindRange search up.

I am using FindRange with a regexp to first find a specific block of text:

// Search from the top to bottom looking for "NAME:func1"
CoordinatePoint stpt = this.Editor.ConvertVirtualPointToCoordinatePoint(1,1);
ITextRange range = this.Editor.FindRange("\bNAME\b.*\bfunc1\b", stpt, null, true, true, false, true);

I then want to start from the point found and search backwards (up) to find another string:


CoordinatePoint pt = this.Editor.ConvertVirtualPointToCoordinatePoint(range.Start.PhysicalPoint.Position, range.Start.PhysicalPoint.Line);
this.Editor.FindRange("\bBEGIN_DEFINITION\b", pt, stpt, true, true, true, true);

The range returned by the second call is always null. The following text is that is in the Edit Control


#BEGIN_DEFINITION
#NAME:func1
#TYPE:codeblock
#
# BEGIN_COMMENT
#
# END_COMMENT
#
#END_DEFINITION

Craig Timmerman
Replied On May 4, 2007 09:57 PM UTC

I forgot to mention, this is Syncfusion 4.2.0.37

Administrator [Syncfusion]
Replied On May 10, 2007 09:15 PM UTC

Hi Craig,

It is possible to search up using the FindRange method. I have attached a sample that illustrates this. Let me know if this meets your requirements.

Thank you for your patience.

Regards,
Ebenezer.P

http://websamples.syncfusion.com/samples/Edit/60455/main.htm

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;