I want to highlight selected text in a wpf textbox while the textbox is not focused. In my application, my textbox never gets focus, and every key input is done manually.
I was wondering if there is a way to highlight the selected text when the textbox is not focused?
Any help would be appreciated!
3 Replies - 4905 Views - Last Post: 23 August 2012 - 10:49 AM
#1
how to highlight/select text in a wpf textbox without focus?
Posted 23 August 2012 - 09:00 AM
Replies To: how to highlight/select text in a wpf textbox without focus?
#2
Re: how to highlight/select text in a wpf textbox without focus?
Posted 23 August 2012 - 09:07 AM
Did you even try to look this up, or experiment or use Intellesense to see the properties and methods?
The MSDN page for this control clearly shows properties for:

Just a tip: Software development is an industry that requires the willingness to research and experiment for your entire life. There is always new stuff to learn, new libraries, new controls, hardware API's and so on. You can't rely on asking the guy in the cubical next to you to do your research and reading for you. If you just can't be bothered with reading the documentation this isn't a good career choice for you.
The MSDN page for this control clearly shows properties for:

Just a tip: Software development is an industry that requires the willingness to research and experiment for your entire life. There is always new stuff to learn, new libraries, new controls, hardware API's and so on. You can't rely on asking the guy in the cubical next to you to do your research and reading for you. If you just can't be bothered with reading the documentation this isn't a good career choice for you.
#3
Re: how to highlight/select text in a wpf textbox without focus?
Posted 23 August 2012 - 10:06 AM
You probably didnt read the question well. It clearly says: how to highlight/select text in a wpf textbox WITHOUT FOCUS. All these properties are very common, and can only be seen by the naked eye in action IF AND ONLY IF the textbox has FOCUS. MY textbox NEVER has focus. I enter the text manually. And consequently I want to highlight a portion of the text in the textbox when my never never got focus and will neevr have focus. I have probably repeated the question for you even more clearly!
#4
Re: how to highlight/select text in a wpf textbox without focus?
Posted 23 August 2012 - 10:49 AM
Since Microsoft already told you this couldn't be done, why did you post it here?
http://social.msdn.m...60-66f025e28fee
I gave you the best solution I could within the parameters of what can be done, and what you've already been told can be done.
If you don't like that reality then do what Microsoft told you, develop your own Textbox and restyle it.
<unsubscribing>
http://social.msdn.m...60-66f025e28fee
I gave you the best solution I could within the parameters of what can be done, and what you've already been told can be done.
If you don't like that reality then do what Microsoft told you, develop your own Textbox and restyle it.
<unsubscribing>
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote




|