https://dl.dropboxusercontent.com/u/858 ... 17x151.png
I want to place the hint in the background of wxTextCtrl.
how to implement place holder for wxTextCtrl Topic is solved
-
- Experienced Solver
- Posts: 64
- Joined: Fri Apr 17, 2009 7:15 am
- Location: Sydney, Australia
- Contact:
how to implement place holder for wxTextCtrl
help me, help you.
http://blog.binchen.org
http://blog.binchen.org
Re: how to implement place holder for wxTextCtrl
You could write "First name" as actual content into the control (with grey color). And when the user clicks into it (control gets focus), you check if it contains the placeholder text. And if yes, you clear the text.
If the focus leaves the control, check if it's empty. And if yes, put the placeholder text back in.
If the focus leaves the control, check if it's empty. And if yes, put the placeholder text back in.
Use the source, Luke!
-
- Experienced Solver
- Posts: 64
- Joined: Fri Apr 17, 2009 7:15 am
- Location: Sydney, Australia
- Contact:
Re: how to implement place holder for wxTextCtrl
Thanks, late I found there is an API SetHint() for wxTextCtrl.
help me, help you.
http://blog.binchen.org
http://blog.binchen.org