Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Selection Vs Highlight  RSS feed

 
Sudhanshu Mishra
Ranch Hand
Posts: 238
1
Eclipse IDE Fedora Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have a doubt regarding with reference to the snippet below:



The issue is that I have implemented the text find feature in my application.The elements are highlighted correctly based on the value in text field. The function given above is actually the event which appears when I press Next Button to go to next matched text.
Now setSelectionStart/End methods are working fine as they are taking me to the matched string line automatically, but the selectioncolor is not changed.
Is this becuase the text is already highlighted?

Any inputs are appreciated.

Thanks
 
m Korbel
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is this becuase the text is already highlighted?

- yes it is

- coordinated must be returned from model, becuase Document can has different lengh as getText()

- remove all own Highlighter before

- never to seen good selections (free) over Highlighter,

more in this code (only I talking about)

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!