Announcement
Collapse
No announcement yet.
firefly blur() event
Collapse
X
-
The dreaded msgbox issues. I use them a lot for troubleshooting, but you do have to remember focus issues. Also for people that wrongly process keys on KeyUp (KeyDown is better and gives you repeat functionality)...msgbox doesn't eat the KeyUp and it gets sent to your control/form too.
-
Hi Shawn,
The problem is the MsgBox stealing focus during the KillFocus of the Text Box. I am sending you a private email based on the project that you sent me.
Leave a comment:
-
I will send you an example, thanks.
It is not only "firing" when expected (when that control looses focus) but when any control looses focus.
Leave a comment:
-
Originally posted by Shawn Anderson View PostNow I see that killFocus is called everytime anything happens, like click on another control.
How can I just call a function when that text box looses focus?
That does make sense that KillFocus will fire whenever the text box looses focus. If you click on another control then obviously the text box no longer has control so it will fire the KillFocus. Maybe you can send me the project or a sample that exhibits the problem and I'll be sure to give you a more specific reasoning for the behavior you're experiencing.
Leave a comment:
-
like this
Code:Function OUTGOING_CONSIGNEDTO_EN_KILLFOCUS ( _ ControlIndex As Long, _ ' index in Control Array hWndForm As Dword, _ ' handle of Form hWndControl As Dword, _ ' handle of Control idTextControl As Long _ ' identifier of text control ) As Long MsgBox "test blur" End Function
Leave a comment:
-
Hi Shawn,
How are you testing for the KillFocus?
Code:'-------------------------------------------------------------------------------- Function FORM1_TEXT1_EN_KILLFOCUS ( _ ControlIndex As Long, _ ' index in Control Array hWndForm As Dword, _ ' handle of Form hWndControl As Dword, _ ' handle of Control idTextControl As Long _ ' identifier of text control ) As Long zTrace "Text1 Killfocus" End Function
Leave a comment:
-
Now I see that killFocus is called everytime anything happens, like click on another control.
How can I just call a function when that text box looses focus?
Leave a comment:
-
Look into WM_SETFOCUS/WM_KILLFOCUS messages. And, if any messages don't exist in the dropdown you can always add it in the CUSTOM message handler. One tool I use all the time is WinSpector to spy on a window or control and see what messages get sent, so I know what to trap and where to trap it (At form level or at control level).
Added:
Actually, in looking, it looks like in the edit controls it is sent as EN_Set/KillFocus messages too which FireFly uses in the dropdown, but either will work.Last edited by Roger Garstang; 20 Aug 2009, 04:11 PM.
Leave a comment:
-
firefly blur() event
In firefly, how can I trap when a control (text box) looses focus?Tags: None
Leave a comment: