Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
IWButtons Hotkey property and the &-sign in Captions
#14
(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"];
}
Reply


Messages In This Thread
RE: IWButtons Hotkey property and the &-sign in Captions - by Alexandre Machado - 09-23-2019, 09:45 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)