When I set the IsReadOnly="True" then this text box no longer gets focus. If I want a readonly text box but with focus function as always how can I achieve that
It actually get the focus but do not show the caret.
Itzik
When I set the IsReadOnly="True" then this text box no longer gets focus. If I want a readonly text box but with focus function as always how can I achieve that
It actually get the focus but do not show the caret.
Itzik
TextBox, IsReadOnly, Focus
Greg D Clark
You can get this behavior if ReadOnly = false and you intercept the key down event (i'm not sure which one is actually thrown) and not pass the keypress event on (by setting KeyDownEventArge e.Handled = true) if it isn't the arrow keys or a modifier. This will stop input but allow selection and give the user a caret.
xlordt
Bruce Baker
Yes I was afraid of that.
I will select all text.
thanx guys
skuehner
sql2000_2005
How about writing some code-behind to highlight the text when the text box gets focus