Mauri Posted October 3, 2016 Share Posted October 3, 2016 I am using the version of 0.99.96.1328 UniGUI / Delphi XE6 and created a new inherited component TUniDBLookupComboBox. I'm using the property clearbutton true and would like to execute a statement when the user clicks the X button (ClearButton). Is there any event that triggers the component when it is clicked the X (ClearButton)? How can I handle this event? Best Regards, Mauri Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted October 4, 2016 Administrators Share Posted October 4, 2016 This event is handled and used internally on client side. It is not sent to the server, so it can not be handled without additional implementations on client side. Link to comment Share on other sites More sharing options...
Sherzod Posted October 4, 2016 Share Posted October 4, 2016 Hi, Can you try this approach?!: For example: UniDBLookupComboBox1 -> ClientEvents -> ExtEvents -> afterrender fn: function afterrender(sender, eOpts) { sender.plugins.forEach(function(p) { if (p.alias[0] == "plugin.clearbutton") { // default click handler: // handleMouseClickOnClearButton: function(event, htmlElement, object) { // if (!this.isLeftButton(event)) { // return; // } // this.textField.setValue(''); // this.textField.focus(); // } // remove default click handler if is needed p.clearButtonEl.un('click', p.handleMouseClickOnClearButton, p); // add your click handler p.clearButtonEl.on('click', function(event, htmlElement, object) { // your logic }) } }) } Best regards. Link to comment Share on other sites More sharing options...
Mauri Posted October 5, 2016 Author Share Posted October 5, 2016 Thank you so much for the reply ... I'll implement your suggestion !!! Link to comment Share on other sites More sharing options...
asapltda Posted February 12, 2020 Share Posted February 12, 2020 Good evening, could you please tell me how to capture this event in a tunimedit thanks Link to comment Share on other sites More sharing options...
Sherzod Posted February 13, 2020 Share Posted February 13, 2020 5 hours ago, asapltda said: could you please tell me how to capture this event in a tunimedit Hello, UnimEdit.ClientEvents.ExtEvents function clearicontap(sender, input, e, eOpts) { } Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now