WPF Textbox "normal" text input

Posted by Ash Rowe on Stack Overflow See other posts from Stack Overflow or by Ash Rowe
Published on 2011-01-09T22:50:40Z Indexed on 2011/01/09 22:53 UTC
Read the original article Hit count: 421

Filed under:
|
|
|

G'day,

I'm not sure if this is a problem relevant to only me or if anyone else has this issue also. None the less, I'll try and describe what is going on here.

I have a few textbox's, default style, etc. I set an explicit maxwidth and maxheight to prevent resize when the text exceeds the default width of the textbox. The issue is that the text wraps to the next line, but I only want single line. So I set maxlines to 1 and textwrapping to NoWrap. That's fine.

Now the carat and typed text disappears under the edges of the textbox when the width is exceeded and the only way I can get the carat and newly typed text back into view is by pressing the left and right arrows. Coming from MFC and using textboxes all the time with HTML, I would have thought the default behaviour would be to have the textbox content scroll with the carat or am I missing something here?

Thank you,

Ash

© Stack Overflow or respective owner

Related posts about c#

Related posts about wpf