jahlxx Posted October 9, 2017 Share Posted October 9, 2017 Hi. How to do something like the image? And capture de click event of the image (or button) Thanks. Quote Link to comment Share on other sites More sharing options...
RobYost Posted October 9, 2017 Share Posted October 9, 2017 There may be an easier way, but I put an image on the form that lines up where I wanted it. It works for me. Quote Link to comment Share on other sites More sharing options...
jahlxx Posted October 9, 2017 Author Share Posted October 9, 2017 Ok. I thought this before. But have many buttons in the form and I must be ocupped in alignment,m etc. In labels I do this: tunilabel.TextConversion:=txtHTML;tunilabel.caption := tunilabel.caption + ' <img src="files/someimage.jpg" border="0" width="10" height="10"'; This works fine, and I'm looking for the way to do the same with uniedit, uninumberedit, and similar components. Thanks. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 9, 2017 Share Posted October 9, 2017 Hi, Yes, it can be done in several waysWe will try to give you a solution. Best regards, Quote Link to comment Share on other sites More sharing options...
RobYost Posted October 9, 2017 Share Posted October 9, 2017 Yes, I only had one field that needed this. But have many buttons in the form and I must be ocupped in alignment,m etc. Quote Link to comment Share on other sites More sharing options...
jahlxx Posted October 9, 2017 Author Share Posted October 9, 2017 Ok. Thanks. I'll wait. Other thing I've tried is: uniedit.fieldlabelseparator := ' '; uniedit.fieldlabelwidth := 10; uniedit.fieldlabel := '<img src="files/someimage.jpg" border="0" width="10" height="10"'; But have some problems: - width of the field is reduced - allways appears the icon in left side - can't control the click event in the image I'll wait some solution. Thanks. Quote Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted October 9, 2017 Share Posted October 9, 2017 Hi Use unicombobox trigger feature with custom trigger image Quote Link to comment Share on other sites More sharing options...
jahlxx Posted October 9, 2017 Author Share Posted October 9, 2017 ??? unicombobox? I need uniedit, numberedit, and so on Enviado desde mi SM-A500FU mediante Tapatalk Quote Link to comment Share on other sites More sharing options...
delagoutte Posted October 10, 2017 Share Posted October 10, 2017 see the demo : http://prime.fmsoft.net/demo/desktop/mdemo.dll Form Controls -> combo trigger Quote Link to comment Share on other sites More sharing options...
jahlxx Posted October 10, 2017 Author Share Posted October 10, 2017 Ok. Thanks. Could be, but I need this in uniedit and uninumberedit. Is possible? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 10, 2017 Share Posted October 10, 2017 Hi, Yes, I will try to give you a solution later... Best regards, Quote Link to comment Share on other sites More sharing options...
jahlxx Posted October 10, 2017 Author Share Posted October 10, 2017 Ok Thanks DD. I'll wait. I've beem reviewing this, but don't want to have additional components: http://forums.unigui.com/index.php?/topic/5089-new-tuniedit-with-new-properties-fieldlabel-labelalign-labelwidth-minlength-minlengthtex-triggersbutton/?p=26005 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 17, 2017 Share Posted October 17, 2017 Hi, Sorry for late reply One of the possible solution, but after porting to ExtJS6 it is very easy to do, with triggers config... UniEdit1 -> .... function afterrender(sender, eOpts) { var me=sender; me.triggerButtonEl = me.bodyEl.createChild({ tag: 'button' }); me.triggerButtonEl.setStyle('position', 'absolute'); me.triggerButtonEl.setStyle('top', '0px'); me.triggerButtonEl.setStyle('right', '0px'); me.triggerButtonEl.setStyle('left', 'auto'); me.triggerButtonEl.setStyle('height', '100%'); me.triggerButtonEl.addListener('click', function(){ //ajaxRequest(me, 'clicked', []); }); me.inputEl.setStyle('padding-right', me.triggerButtonEl.getWidth()+1); } Best regards, 1 Quote Link to comment Share on other sites More sharing options...
jahlxx Posted October 18, 2017 Author Share Posted October 18, 2017 Ok. I'll try. But, first, how to port to ExtJS6? thanks. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 18, 2017 Share Posted October 18, 2017 http://forums.unigui.com/index.php?/topic/6338-updated-roadmap/page-2&do=findComment&comment=48169 Quote Link to comment Share on other sites More sharing options...
jahlxx Posted May 18, 2018 Author Share Posted May 18, 2018 Backing with this. The button is there with your code, but: 1. clearbutton of the edit field disappears 2. the look is different that in combobox triggers (iconcls and so on) Thanks. Quote Link to comment Share on other sites More sharing options...
brunomf01 Posted January 13, 2020 Share Posted January 13, 2020 On 10/17/2017 at 10:11 AM, Sherzod said: Hi, Sorry for late reply One of the possible solution, but after porting to ExtJS6 it is very easy to do, with triggers config... UniEdit1 -> .... function afterrender(sender, eOpts) { var me=sender; me.triggerButtonEl = me.bodyEl.createChild({ tag: 'button' }); me.triggerButtonEl.setStyle('position', 'absolute'); me.triggerButtonEl.setStyle('top', '0px'); me.triggerButtonEl.setStyle('right', '0px'); me.triggerButtonEl.setStyle('left', 'auto'); me.triggerButtonEl.setStyle('height', '100%'); me.triggerButtonEl.addListener('click', function(){ //ajaxRequest(me, 'clicked', []); }); me.inputEl.setStyle('padding-right', me.triggerButtonEl.getWidth()+1); } Best regards, How can I set the iconCls of this Button in afterrender function? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 14, 2020 Share Posted January 14, 2020 5 hours ago, brunomf01 said: How can I set the iconCls of this Button in afterrender function? Like this for example: function afterrender(sender, eOpts) { var me=sender; me.triggerButtonEl = me.bodyEl.createChild({ tag: 'button', html: '<i class="fa fa-search fa" style="position:relative; color:grey;"></i>' }); me.triggerButtonEl.setStyle('position', 'absolute'); me.triggerButtonEl.setStyle('top', '0px'); me.triggerButtonEl.setStyle('right', '0px'); me.triggerButtonEl.setStyle('left', 'auto'); me.triggerButtonEl.setStyle('height', '100%'); me.triggerButtonEl.addListener('click', function(){ //ajaxRequest(me, 'clicked', []); }); me.inputEl.setStyle('padding-right', me.triggerButtonEl.getWidth()+1); } 1 Quote Link to comment Share on other sites More sharing options...
brunomf01 Posted January 14, 2020 Share Posted January 14, 2020 I want to learn more about ExtEvents and UniEvents. Where can I find materials to learn how to manipulate these features? There are many features we can use, but I still don't know how to use the documentation properly. I would like further study. Quote Link to comment Share on other sites More sharing options...
herculanojs Posted January 16, 2020 Share Posted January 16, 2020 On 1/14/2020 at 12:59 AM, Sherzod said: Like this for example: function afterrender(sender, eOpts) { var me=sender; me.triggerButtonEl = me.bodyEl.createChild({ tag: 'button', html: '<i class="fa fa-search fa" style="position:relative; color:grey;"></i>' }); me.triggerButtonEl.setStyle('position', 'absolute'); me.triggerButtonEl.setStyle('top', '0px'); me.triggerButtonEl.setStyle('right', '0px'); me.triggerButtonEl.setStyle('left', 'auto'); me.triggerButtonEl.setStyle('height', '100%'); me.triggerButtonEl.addListener('click', function(){ //ajaxRequest(me, 'clicked', []); }); me.inputEl.setStyle('padding-right', me.triggerButtonEl.getWidth()+1); } how can i pass this code at runtime. I can't make it work with dynamic component creation Quote Link to comment Share on other sites More sharing options...
herculanojs Posted January 16, 2020 Share Posted January 16, 2020 Quote Link to comment Share on other sites More sharing options...
herculanojs Posted January 16, 2020 Share Posted January 16, 2020 Just now, herculanojs said: Added name and it works Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 16, 2020 Share Posted January 16, 2020 19 minutes ago, herculanojs said: 22 minutes ago, herculanojs said: Added name and it works Yes. Quote Link to comment Share on other sites More sharing options...
MR-Irawan Posted November 19, 2021 Share Posted November 19, 2021 On 1/14/2020 at 11:59 AM, Sherzod said: Like this for example: function afterrender(sender, eOpts) { var me=sender; me.triggerButtonEl = me.bodyEl.createChild({ tag: 'button', html: '<i class="fa fa-search fa" style="position:relative; color:grey;"></i>' }); me.triggerButtonEl.setStyle('position', 'absolute'); me.triggerButtonEl.setStyle('top', '0px'); me.triggerButtonEl.setStyle('right', '0px'); me.triggerButtonEl.setStyle('left', 'auto'); me.triggerButtonEl.setStyle('height', '100%'); me.triggerButtonEl.addListener('click', function(){ //ajaxRequest(me, 'clicked', []); }); me.inputEl.setStyle('padding-right', me.triggerButtonEl.getWidth()+1); } How can I add hint or tool tip on the button? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 19, 2021 Share Posted November 19, 2021 Hello, 6 minutes ago, MR-Irawan said: How can I add hint on the button? 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.