Know the control that has lost focus

63 views
Skip to first unread message

Mario Rossi

unread,
Mar 19, 2024, 9:53:24 AM3/19/24
to Harbour Minigui
Hi everyone, 
with the code <WindowName>.FocusedControl I can know the name of the control that has the FOCUS. Is there a way for me to know the name of the control that lost FOCUS (something like <WindowName>.LastFocusedControl)? 

Greetings



Spencer Redfield

unread,
Mar 19, 2024, 10:01:24 AM3/19/24
to Mario Rossi, Harbour Minigui
Perhaps store the <WindowName>.FocusedControl  value to a variable whenever a control receives focus.
Then when another control (next) receives focus simply refer to the variable (from above).

--
Visit our website on https://www.hmgextended.com/ or https://www.hmgextended.org/
---
You received this message because you are subscribed to the Google Groups "Harbour Minigui" group.
To unsubscribe from this group and stop receiving emails from it, send an email to minigui-foru...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/minigui-forum/49b3a5a4-97a5-45f1-ae8a-01a38bd078aan%40googlegroups.com.

Mario Rossi

unread,
Mar 19, 2024, 10:09:20 AM3/19/24
to Harbour Minigui
HI, Spencer,
thanks for the reply. 
I thought about it but I wanted to avoid inserting the ONGOTFOCUS property for each control created within the window. 

Greetings

Ivanil Marcelino

unread,
Mar 19, 2024, 5:46:14 PM3/19/24
to Mario Rossi, Harbour Minigui
Of course, it all depends a lot on what you will do; but it may be that a simple "this.name" will already solve your problem.

Reply all
Reply to author
Forward
0 new messages