本人想问下wxctrltext中哪个事件可以在点击文本框时触发?我试过用 onchart 或者onclick 还有 getcursor 也用用过,不过没办法达到我想要的那种效果,我希望如下图
在我点击用户文名文本框的时候清空文本框内的文字,当光标离开文本框的时候判断文本框是否为空如果是直接赋值为“please enter your username”。
请各位前辈大神们指点下有没有哪些可以在 connect() 或 BEGIN_EVENT_TABLE(Frame,wxFrame) end 中运行的事件?
wxctrltext中事件问题求助!! Topic is solved
Re: wxctrltext中事件问题求助!!
wxFocusEvent is what you're looking for:
http://docs.wxwidgets.org/trunk/classwx ... event.html
However, on Vista systems and higher you don't need to implement this yourself, because there is this:
http://docs.wxwidgets.org/trunk/classwx ... be83f1bed4
http://docs.wxwidgets.org/trunk/classwx ... event.html
However, on Vista systems and higher you don't need to implement this yourself, because there is this:
http://docs.wxwidgets.org/trunk/classwx ... be83f1bed4
Use the source, Luke!