Okay, I have an on-screen keypad made up of a panel with buttons with the kind of functionality you would expect 0 .. 9, Delete, BkSpace and Enter. It's an application for a touchscreen system.
The values entered by "pressing" the keys are shown in a TEdit
. Almost all of it works perfectly, but I have an issue with passing a keystroke to the TEdit
control when I want to backspace within the TEdit
. I can simply delete the last character in the TEdit
by using the Copy function and I guess I could do something similar for Delete.
But it would be much neater to pass the "key" button tag for backspace to the TEdit
control and have it convert that to VK_BACKSPACE
or VK_DELETE
.
The problem is that while I've captured and used the virtual keycodes before, I've never tried to pass one to a control's event before and I can't find anything which really helps, either here or doing a general search or trawling through the Embarcadero documentation.
I'm sure this is dreadfully simple and I'm missing something easy, but could somebody point me at it, please?