Hello!
I'm searching for a way, that an UnimImage react on user gestures. Unfortunately the OnDblClick-event is already in use in my application.
So I'm searching for something like OnClickHold for components like UnimImage, UnimPanel , UnimButton etc.
Is it possible to do this with OnAjaxEvent? If yes - how?
Best regards
Mike
Hello,
For example for UnimImage.
1.
procedure TMainmForm.UnimFormCreate(Sender: TObject);
begin
with UnimImage1, UnimImage1.JSInterface do
JSAddElListener('taphold', 'element', JSFunction('', 'ajaxRequest('+ JSName +', "_taphold", [])'));
end;
2.
procedure TMainmForm.UnimImage1AjaxEvent(Sender: TComponent; EventName: string;
Params: TUniStrings);
begin
if EventName = '_taphold' then
ShowMessage('TapHold')
end;