fixed barcode scanning focus issues

This commit is contained in:
Infineon\StieberD
2024-09-10 18:14:46 -07:00
parent 31f9796cff
commit 5fdcfdafb4
4 changed files with 150 additions and 136 deletions

View File

@ -120,6 +120,7 @@ end event
Event EDL_LABEL1_SCAN.LOSTFOCUS(Flag, FocusID)
Set_Property(SaveBtn$, 'FOCUS', True$)
ScanField = 'Label1'
If Flag EQ 1 then
@ -138,6 +139,7 @@ Event EDL_LABEL1_SCAN.LOSTFOCUS(Flag, FocusID)
if ErrorMessage NE 'Scan Cancelled' then
Msg(@Window, MsgStruct, 'PROCESS_ERROR', '', ErrorMessage)
end
Set_Property(@Window:'.EDL_LABEL1_SCAN', 'FOCUS', True$)
end
end
end
@ -147,6 +149,7 @@ end event
Event EDL_LABEL2_SCAN.LOSTFOCUS(Flag, FocusID)
Set_Property(SaveBtn$, 'FOCUS', True$)
ScanField = 'Label2'
If Flag EQ 1 then
ScanData = Get_Property(CtrlEntID, 'TEXT')
@ -165,14 +168,13 @@ Event EDL_LABEL2_SCAN.LOSTFOCUS(Flag, FocusID)
if ErrorMessage[1,13] EQ 'Scan Mismatch' then
Msg(@Window, MsgStruct, 'PROCESS_ERROR', '', ErrorMessage)
Gosub ResetForm
Set_Property(@Window:'.EDL_LABEL1_SCAN', 'FOCUS', True$)
end else
Set_Property(@Window:'.EDL_LABEL2_SCAN', 'ENABLED', True$)
Set_Property(@Window:'.EDL_LABEL2_SCAN', 'TEXT', '')
Set_Property(@Window:'.EDL_LABEL2_SCAN', 'FOCUS', True$)
//ErrorMessage = Error_Services('GetMessage')
Msg(@Window, MsgStruct, 'PROCESS_ERROR', '', ErrorMessage)
Set_Property(@Window:'.EDL_LABEL2_SCAN', 'FOCUS', True$)
end
end
end
end
@ -225,7 +227,6 @@ ShowPopup:
ForeColor = Get_Property(@Window, 'FORECOLOR')
CursorXPos = Field(Point, ',', 1, 1)
CursorYPos = Field(Point, ',', 2, 1)
* FormSize = SRP_Get_Window_Rect(@Window)
FormSize = Get_Property(@Window, 'SIZE')
FormXPos = FormSize<1>
FormYPos = FormSize<2>
@ -366,4 +367,3 @@ ResetForm:
return