Home » U++ Library support » LineEdit, EditFields, DocEdit » How to capture Key Press events?
Re: How to capture Key Press events? [message #38121 is a reply to message #38119] |
Sun, 02 December 2012 07:38 |
|
lectus wrote on Sun, 02 December 2012 02:03 | How to do something when the user types on a EditString?
|
There is WhenAction callback just for this
struct App : TopWindow {
typedef App CLASSNAME;
EditString s;
Label l;
App(){
Add(s.HSizePosZ(5,5).TopPosZ(5,25));
Add(l.HSizePosZ(5,5).TopPosZ(35,25));
s.WhenAction << THISBACK(DoSomething);
}
void DoSomething(){
l.SetLabel("Length: "+IntStr(AsString(~s).GetCharCount()));
}
};
Best regards,
Honza
|
|
|
Goto Forum:
Current Time: Mon Apr 29 02:51:45 CEST 2024
Total time taken to generate the page: 0.02706 seconds
|