Page 2 of 2
Re: Virtual Keyboard
Posted: Mon Nov 07, 2016 10:18 pm
by Antonio Linares
I agree with James proposed solution:
viewtopic.php?p=71440#p71440
Re: Virtual Keyboard
Posted: Tue Nov 08, 2016 5:34 am
by Gross
Hello Antonio,
With the keyboard, the input is ok. I would also like this with a virtual keyboard ( 'KeyChar ()')
I have a POS system with input in numeric fields with keyboard or virtual keyboard. Here you should also enter numeric values in numeric get.
When entering into character fields, I have to convert the value back into numeric values before and after input.
Antonio, you can check this again
Thank you Manfred
Re: Virtual Keyboard
Posted: Tue Nov 08, 2016 6:32 pm
by Antonio Linares
Manfred,
When the button is pressed, the GET looses the focus and the numeric value changes. We can't stop that as we use a standard Harbour GET from FWH Class TGet
so the only solution that I see it is as James proposed
Re: Virtual Keyboard
Posted: Tue Nov 08, 2016 6:55 pm
by Antonio Linares
I have tried different possible solutions without luck:
oGet[2]:bGotFocus:={|| nX:=2, oGet[2]:SetText( buffer ) }
oGet[2]:bLostFocus:={|| buffer := oGet[2]:GetText() }
and
oGet[2]:bGotFocus:={|| nX:=2, oGet[2]:oGet:buffer := buffer }
oGet[2]:bLostFocus:={|| buffer := oGet[2]:oGet:buffer }
the problem comes from the fact that the GET looses the focus when the button is pressed
Re: Virtual Keyboard
Posted: Tue Nov 08, 2016 6:58 pm
by Antonio Linares
This is a possible solution:
ACTIVATE DIALOG oDlg CENTER ;
ON CLICK ( SetFocus(oGet[nX]:hWnd), oGet[nX]:KeyChar(asc("1")))
Click on the dialog and it will work fine
The solution would be not to use real buttons and use painted buttons (simulated buttons) on the dialog.
This way the GET does not looses the focus
Re: Virtual Keyboard
Posted: Sat Nov 12, 2016 7:32 am
by Gross
Hello Antonio,
thank you!
Greeting Manfred