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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

FindRange with search up option

Thread ID:





60455 May 4,2007 09:44 PM UTC May 10,2007 09:15 PM UTC WinForms 2
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


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

I forgot to mention, this is Syncfusion

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.




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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

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