Findbar highlighting

  • Hello,

    Since Lion NSTextView has this very nice feature - when searching for a
    text as a user it also highlights all the occurrences of given search
    string.

    Is it possible to programmatically "force" triggering the highlighting? In
    other words, is it possible to re-use the functionality to highlight some
    string, without actually using the findbar?

    Have a nice day,

    Ecir Hana
  • Yes, this should be possible, have a look at the NSTextFinder class and especially at the NSTextFinderClient protocol.

    Tim

    Am 18.06.2012 um 20:03 schrieb ecir hana:

    > Hello,
    >
    > Since Lion NSTextView has this very nice feature - when searching for a
    > text as a user it also highlights all the occurrences of given search
    > string.
    >
    > Is it possible to programmatically "force" triggering the highlighting? In
    > other words, is it possible to re-use the functionality to highlight some
    > string, without actually using the findbar?
    >
    > Have a nice day,
    >
    > Ecir Hana
previous month june 2012 next month
MTWTFSS
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30  
Go to today