SharpDevelop Community

Get your problems solved!
Welcome to SharpDevelop Community Sign in | Join | Help
in Search

Making word search with ICSharpCode.TextEditor.TextEditorControl

Last post 01-02-2008 7:12 PM by Rakoun. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 12-18-2007 9:26 PM

    • Rakoun
    • Not Ranked
    • Joined on 12-18-2007
    • Guadeloupe
    • Posts 3

    Making word search with ICSharpCode.TextEditor.TextEditorControl

    Hey,

    First of all, I congratulate the development team who works under ICSharpCode.TextEditor because it is a very usefull library that I use in my project.

    Now, I need to be able to load a file in a TextEditorControl and compute a search on it. I want to be able to keybord a word and then highlight the file lines witch contain this word. Is it possible? If yes how can I do this?

    Thanks.

    R.

    /°\

    Pa konèt mové, dèyè do sé on péyi.
  • 12-20-2007 3:00 PM In reply to

    • Rakoun
    • Not Ranked
    • Joined on 12-18-2007
    • Guadeloupe
    • Posts 3

    Re: Making word search with ICSharpCode.TextEditor.TextEditorControl

    Nobody can help me?

     

    R.

    /°\

    Pa konèt mové, dèyè do sé on péyi.
  • 01-02-2008 7:12 PM In reply to

    • Rakoun
    • Not Ranked
    • Joined on 12-18-2007
    • Guadeloupe
    • Posts 3

    Re: Making word search with ICSharpCode.TextEditor.TextEditorControl

    Hello,

    I didn't find the best solution but I found a easy one. I didn't find any methods in TextEditorControl API that allow to find a string in the associated file and then select the line that contains this string. But I find the method JumpTo in the TxtAreaControl that allow me to select a specific line. As I save the line number in witch the string I search is, the code is simple. This is a exemple of my source code:

    TextAreaControl txtAreaControl = dropEditor.TextEditor.ActiveTextAreaControl;

    // myLine is a integer containing the line number where the occurrence of the searching string is.

    txtAreaControl.JumpTo(myLine - 1);

    Rakoun

    /°\

    Pa konèt mové, dèyè do sé on péyi.
Page 1 of 1 (3 items)
Powered by Community Server (Commercial Edition), by Telligent Systems
Don't contact us via this (fleischfalle@alphasierrapapa.com) email address.