On Wed, Mar 24, 2010 at 7:27 PM, Ken MacDonald <drken...@gmail.com> wrote:

> Hi,
> Using WPF. I'll give the Start/Length a try....
> Ken
>
> OK, I tried that in various flavors, still not working. The selection
itself appears to be working; if I un-comment the "Cut()" at the end, I
click into the box and the existing text disappears. Without the Cut(), if I
click into the box, the caret appears at the end of the existing text, the
text is NOT highlighted (as in Ctrl-A, which works fine), and typing just
appends to the existing text. Any clues appreciated. I've been trying to get
this working for several days now, and everything I've found seems to
indicate this should work.
Ken


>     def guest_name_keyboard_focus(self, sender, args):
>         print("got focus!")
>         textbox = self.control("NewGuestName")
>         #textbox.SelectAll()
>         textbox.Focus()
>         textbox.SelectionStart = 0
>         textbox.SelectionLength = len(textbox.Text)
>


>         #textbox.Cut()   <=== works if un-commented
>
>
_______________________________________________
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to