09-23-2019, 09:45 AM
(This post was last modified: 09-23-2019, 09:46 AM by Alexandre Machado.)
(09-21-2019, 01:36 PM)JuergenS Wrote: Hi Soren,
this is an C++ example of handling a button event from an edit control
which also requires little effort and of course can be implemented in Delphi:
void __fastcall TIWFormEdit::IWEditAsyncKeyDown(TObject *Sender, TStringList *EventParams)
{
if(vkF10 == EventParams->ValueFromIndex[EventParams->IndexOfName(L"which")].ToInt())
{
// Call your corresponding button event handler
IWButtonClick(Sender);
}
}
Regards
Juergen
You don't need all this to retrieve the parameter value. You can use property Values of TStringList type to get exactly what you want:
Code:
void __fastcall TIWForm1::IWButton1AsyncClick(TObject *Sender, TStringList *EventParams)
{
UnicodeString key = EventParams->Values["which"];
}