Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.
Double click fires
Not sure what I am doing wrong, I have used this control elsewhere without this issue.
The form opens but if I move focus away from the control instead of a single click firing, I get a double click. Same issue if I click back on the form I get a double click as the form gets focus.
Create event code calls this code.
Subroutine Qualify_All_Ole(Ctrl)
*********************************************************************
* visim jrv 4-13-09 *
* qualify all ole events *
* new code from Don Bakke *
*********************************************************************
DECLARE FUNCTION Send_Message, Get_Property
Qualify = ""
Qualify<1> = 1
Qualify<3> = ""
If Get_Property(@Window, "@DIALOG_BOX") EQ 1 then
// Modal Dialog Boxes cannot process synchronous events so the asynchronous flag must be used.
// There is no way to programmatically detect if the current window is running as a dialog box.
// Therefore the CREATE event in the current window's commuter module should set this UDP in
// order for this to be set correctly here.
Qualify<4> = 0 ; // Asynchronous event processing
end else
Qualify<4> = 2 ; // Synchronous event processing
end
* not sure what this is for (from Don Bakke SRP)
* If EventExists then
* Qualify<2> = 13:"*":EventKey
* end
Ret_Val = Send_Message(Ctrl, "QUALIFY_EVENT", "ALL_OLES", Qualify)
// Qualify EditTable LostFocus and GotFocus events as asynchronous. This worksaround a known bug where
// clicking away from a window with an EditTable and then back causes a double-click to fire.
Qualify<4> = 0
Ret_Val = Send_Message(Ctrl, "QUALIFY_EVENT", "OLE.LostFocus", Qualify)
Ret_Val = Send_Message(Ctrl, "QUALIFY_EVENT", "OLE.GotFocus", Qualify)
Return
The form opens but if I move focus away from the control instead of a single click firing, I get a double click. Same issue if I click back on the form I get a double click as the form gets focus.
Create event code calls this code.
Subroutine Qualify_All_Ole(Ctrl)
*********************************************************************
* visim jrv 4-13-09 *
* qualify all ole events *
* new code from Don Bakke *
*********************************************************************
DECLARE FUNCTION Send_Message, Get_Property
Qualify = ""
Qualify<1> = 1
Qualify<3> = ""
If Get_Property(@Window, "@DIALOG_BOX") EQ 1 then
// Modal Dialog Boxes cannot process synchronous events so the asynchronous flag must be used.
// There is no way to programmatically detect if the current window is running as a dialog box.
// Therefore the CREATE event in the current window's commuter module should set this UDP in
// order for this to be set correctly here.
Qualify<4> = 0 ; // Asynchronous event processing
end else
Qualify<4> = 2 ; // Synchronous event processing
end
* not sure what this is for (from Don Bakke SRP)
* If EventExists then
* Qualify<2> = 13:"*":EventKey
* end
Ret_Val = Send_Message(Ctrl, "QUALIFY_EVENT", "ALL_OLES", Qualify)
// Qualify EditTable LostFocus and GotFocus events as asynchronous. This worksaround a known bug where
// clicking away from a window with an EditTable and then back causes a double-click to fire.
Qualify<4> = 0
Ret_Val = Send_Message(Ctrl, "QUALIFY_EVENT", "OLE.LostFocus", Qualify)
Ret_Val = Send_Message(Ctrl, "QUALIFY_EVENT", "OLE.GotFocus", Qualify)
Return
Comments