Jump to content

Recommended Posts

Posted

Hi,

 

I am wondering if it is possible to handle following events in TUniButton.

 

OnExit - Occurs when the input focus shifts away from one control to another.  

Key Pressed,

Key Down,

Key Press,

Key Up

 

Thanks & Regards,

Posted

Hi,

 

For now one of the possible variants, you can use the "ClientEvents" and "OnAjaxEvent":

for Example for OnExit:

 

UniButton1 -> ClientEvents -> ExtEvents ... blur fn:

function blur(sender, the, eOpts)
{
  ajaxRequest(sender, "_onExit", []);
}

and

procedure TMainForm.UniButton1AjaxEvent(Sender: TComponent; EventName: string;
  Params: TUniStrings);
begin
  if EventName = '_onExit' then
  begin
    ShowMessage('Exit');
  end;
end;

Other events similar to this...

 

Best regards.

Posted

Hi,

 

For now one of the possible variants, you can use the "ClientEvents" and "OnAjaxEvent":

for Example for OnExit:

 

UniButton1 -> ClientEvents -> ExtEvents ... blur fn:

function blur(sender, the, eOpts)
{
  ajaxRequest(sender, "_onExit", []);
}

and

procedure TMainForm.UniButton1AjaxEvent(Sender: TComponent; EventName: string;
  Params: TUniStrings);
begin
  if EventName = '_onExit' then
  begin
    ShowMessage('Exit');
  end;
end;

Other events similar to this...

 

Best regards.

 

When does OnAjaxEvent of a control trigger? I tried this with button and I could only figured out it for mouse click in on button.

 

Thanks

Posted

Sorry, can you clarify ?!

 

Ohh...!

 

I mean to say. Do I need always need to fire the AjaxRequest manually (like you did in blur) or it automatically fires?

For button_click event TUniButton was triggering AjaxRequest automatically. So I was wondering if you can tell me about the actions that can triggers AjaxRequest event for a control.

 

Thanks & Regards,

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...