1. Position cursor in wxTextCtrl after button press
- Posted by Joel Garcia <heyjoel at comcast.net> Mar 21, 2007
- 570 views
- Last edited Mar 22, 2007
After clicking a button I use clear_text() on a wxTextCtrl to reset the contents to empty. I would like to also position the cursor in that same wxTextCtrl as the active control so that the user can then paste new text into the control. I've looked through the wxEuphoria documentation and haven't been able to locate a solution. Any ideas? Many thanks, Joel
2. Re: Position cursor in wxTextCtrl after button press
- Posted by Matt Lewis <matthewwalkerlewis at gmail.com> Mar 21, 2007
- 535 views
- Last edited Mar 22, 2007
Joel Garcia wrote: > > After clicking a button I use clear_text() on a wxTextCtrl to reset the > contents > to empty. I would like to also position the cursor in that same wxTextCtrl as > the active control so that the user can then paste new text into the control. > I've looked through the wxEuphoria documentation and haven't been able to > locate > a solution. Any ideas? Have you tried set_focus()? Matt
3. Re: Position cursor in wxTextCtrl after button press
- Posted by Joel Garcia <heyjoel at comcast.net> Mar 21, 2007
- 522 views
- Last edited Mar 22, 2007
Matt Lewis wrote: > > Joel Garcia wrote: > > > > After clicking a button I use clear_text() on a wxTextCtrl to reset the > > contents > > to empty. I would like to also position the cursor in that same wxTextCtrl > > as > > the active control so that the user can then paste new text into the > > control. > > I've looked through the wxEuphoria documentation and haven't been able to > > locate > > a solution. Any ideas? > > Have you tried set_focus()? > > Matt Thanks, Matt. I'm still trying to get a handle on programming for Windows and making easy mistakes. I was confused until I read that any object based on wxWindow can used procedures that require a window parameter. I didn't realize that this meant that most controls could be specified as the window parameter in procedures such as set_focus(). I think I've got that right, at least. Thanks for the help. Joel