Volk65 Posted March 20, 2019 Share Posted March 20, 2019 How to make a list of "buttons" (as in the picture)? So that it was a button + delete button (with a cross). To get a reaction to two events: 1. Pressed the main button, 2. Pressed the cross. The list will be created dynamically at run time. Is that possible? Quote Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted March 20, 2019 Share Posted March 20, 2019 Hi Please assign an icon to button and set iconAlign to right. with UniButton1, JSInterface do begin JSConfigObject('listeners','btnIconEl', [JSObject(['click', JSFunction('sender','ajaxRequest('+JSName+', "iconClick");')])]); end; 2 Quote Link to comment Share on other sites More sharing options...
Volk65 Posted March 20, 2019 Author Share Posted March 20, 2019 Thanks, I will try What is btnIconEl, and where is it defined? Quote Link to comment Share on other sites More sharing options...
Volk65 Posted March 20, 2019 Author Share Posted March 20, 2019 Shaytan! It works! Thank you! Quote Link to comment Share on other sites More sharing options...
Volk65 Posted March 20, 2019 Author Share Posted March 20, 2019 Need clarification. When you click on the icon, two events are called sequentially: Button.AjaxEvent then Button.OnClick. And in the OnClick event I can't understand what was pressed, the button or the icon. Or I need two events in AjaxEvent, separately for the button and for the icon: JSConfigObject('listeners','btnIconEl', [JSObject(['click', JSFunction('sender','ajaxRequest('+JSName+', "iconClick");')])]); JSConfigObject('listeners','Button????', [JSObject(['click', JSFunction('sender','ajaxRequest('+JSName+', "buttonClick");')])]); Quote Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted March 20, 2019 Share Posted March 20, 2019 Hi please check this JSConfigObject('listeners','btnIconEl', [JSObject(['click', JSFunction('e','e.stopPropagation(); e.preventDefault(); ajaxRequest('+JSName+', "iconClick");')])]); 1 Quote Link to comment Share on other sites More sharing options...
Volk65 Posted March 20, 2019 Author Share Posted March 20, 2019 Yes-s-s!!! Strike! 1 hour ago, Hayri ASLAN said: JSConfigObject('listeners','btnIconEl', [JSObject(['click', JSFunction('e','e.stopPropagation(); e.preventDefault(); ajaxRequest('+JSName+', "iconClick");')])]); Quote Link to comment Share on other sites More sharing options...
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.