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 » Community » Newbie corner » [solved] Widget events - any other than WhenAction ? (Trying to find equivalents of OnEnter, OnExit - in an Edit widget)
Re: Widget events - any other than WhenAction ? [message #52739 is a reply to message #52738] Sat, 16 November 2019 08:27 Go to previous messageGo to previous message
xrysf03 is currently offline  xrysf03
Messages: 43
Registered: November 2018
Location: CZ
Member
@Oblivion okay, thanks for your patient explanation. I've learned a new trick Smile

At face value, I can see that there are no ready "When callbacks" for a widget getting or losing focus.

Taking one step back, and using the excellent "API search" function, I have noticed the following methods, defined in Ctrl.cpp:

void Ctrl::GotFocus()                               {}
void Ctrl::LostFocus()                              {}


They're actually documented here. Means to me that this is not... say... a Win32-specific feature, or a Borland VCL feature, but actually there is rudimentary systemic support for this in the U++ GUI layer.

And obviously I'm wondering... to get the desired "callback on an Edit losing focus", I'd need to inherit from say EditDouble and overload its LostFocus() - but next, I'd have to embed that in a layout, so first I'd need to create a visual component, along the lines of MyEditDouble.

I haven't advanced that far yet, maybe I should, but at the same time I'm wondering... how much trouble would it be, instead, to create systemwide WhenGotFocus/WhenLostFocus actions by adding some stuff to Ctrl::GotFocus()/LostFocus() Smile This is not necessarily a feature request, let me say that I'm just wondering aloud at this stage... Or, would it be against some "design virtues" of U++ to add those? Would it break existing code? Make existing code run slower?
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: App "swallowing" mouseclicks
Next Topic: no variables in debug mode
Goto Forum:
  


Current Time: Sun May 12 06:22:57 CEST 2024

Total time taken to generate the page: 0.02667 seconds