BantuKumar Posted March 11, 2016 Posted March 11, 2016 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, Quote
Sherzod Posted March 11, 2016 Posted March 11, 2016 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. Quote
BantuKumar Posted March 11, 2016 Author Posted March 11, 2016 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 Quote
Sherzod Posted March 11, 2016 Posted March 11, 2016 I tried this with button and I could only figured out it for mouse click in on button. Sorry, can you clarify ?! Quote
BantuKumar Posted March 11, 2016 Author Posted March 11, 2016 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, Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.