开发者

Controlling the position of Silverlight textbox's caretbrush

开发者 https://www.devze.com 2023-01-24 08:58 出处:网络
I believe the cursor over a textbox is called a caretbrush. There are times application is run without a keyboard/ mouse (eg: Kiosk), so I will put up a virtual keyboard for the user.

I believe the cursor over a textbox is called a caretbrush.

There are times application is run without a keyboard/ mouse (eg: Kiosk), so I will put up a virtual keyboard for the user.

The virtual keyboard appends to the textbox programmatically. When I focus on the textbox, irregardless of have any text in it, the caretbrush will always be at the leftmost position.

Is there anyway I can control the position of it?

If unable to do it, guess I just hide the caret brush, ot开发者_JAVA百科herwise it looks abit confusing especially when u are at the 3rd character but the caretbrush shows on the 1st character.


I found the answer already.

txt1.SelectionStart=txt1.text.length


but txt1.SelectionStart=txt1.text.length-1 is only correct

0

精彩评论

暂无评论...
验证码 换一张
取 消