Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » LineEdit, EditFields, DocEdit » How to capture Key Press events?
Re: How to capture Key Press events? [message #38129 is a reply to message #38125] Sun, 02 December 2012 14:56 Go to previous messageGo to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

lectus wrote on Sun, 02 December 2012 13:44

So, the WhenAction callback is mostly a generic callback, right? Depends on the type of Ctrl.

Yes, it is very generic. In some Ctrls it might even never be called Smile The general idea is that it is called whenever the "value" of the widget changes. However given how generic it is, it can do pretty much anything, depending on what the author of the widget deems useful, so it is always better to check the docs or code to see when you can expect it to be executed and when not.

What nlneilson mentioned is another way to achieve this by inheritance and method overloading. It can be used too, should be bit more general (you can use it even for Ctrls where WhenAction callback usage is not/badly implemented), but it is most probably overkill in this case Wink

Quote:

U++ produces great user experience in applications.
That's one of the main goals, IIRC Very Happy

Honza
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: need some expert advice to extend the LineEdit
Next Topic: BUG: LineEdit "Drag And Drop" violates read-only state
Goto Forum:
  


Current Time: Sun Apr 28 23:01:09 CEST 2024

Total time taken to generate the page: 0.06611 seconds