Freeman35 Posted November 26, 2017 Share Posted November 26, 2017 Hello, 1- How can I change TUniRadioGroup's caption Font's properties (Color, size etc.) ? 2- How can I change TUniRadioGroup's caption Alignment ? (center, right etc.) 3- How can I decrice space between top borderline and item(s) Thank you Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 26, 2017 Share Posted November 26, 2017 Hello, Hello, 1- How can I change TUniRadioGroup's caption Font's properties (Color, size etc.) ? 2- How can I change TUniRadioGroup's caption Alignment ? (center, right etc.) One possible solution, can you try this? UniRadioGroup -> ClientEvents -> ExtEvents -> function boxready: function boxready(sender, width, height, eOpts) { var legend=sender.legend.el; legend.dom.setAttribute('align', 'center'); //left, right var legendText=legend.select('.x-fieldset-header-text').elements[0]; legendText.style['color']="green"; legendText.style['font-size']="12px"; legendText.style['font-weight']="bold"; } Best regards, Quote Link to comment Share on other sites More sharing options...
Freeman35 Posted November 26, 2017 Author Share Posted November 26, 2017 Hello, At this time nearly perfect Color properties is okey, but legend Attribute not work for me. var legend=sender.legend.el; legend.dom.setAttribute('align', 'center'); //left, right not work. best regards Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 26, 2017 Share Posted November 26, 2017 Hello, Hello, At this time nearly perfect Color properties is okey, but legend Attribute not work for me. var legend=sender.legend.el; legend.dom.setAttribute('align', 'center'); //left, right not work. best regards Which browser are you using? Quote Link to comment Share on other sites More sharing options...
Freeman35 Posted November 27, 2017 Author Share Posted November 27, 2017 Hello, Which browser are you using? Win 10 -> Firefox 57(quantum), Edge Mac OS Firefox 57(Quantum), Safari, Opera same all of them Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 27, 2017 Share Posted November 27, 2017 Ok, I will check it now Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 27, 2017 Share Posted November 27, 2017 Just checked on FF Quantum 57.0 (64-bit), works for me Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 27, 2017 Share Posted November 27, 2017 Can you make a simple testcase ?! Quote Link to comment Share on other sites More sharing options...
Freeman35 Posted November 27, 2017 Author Share Posted November 27, 2017 And to end, I found problem. just remove "\bootstrap-3.3.7\css\bootstrap.min.css" from servermodule, work normal. Normal mean, radiogroup caption print centered now. I just add bootstrap css, but not use any element. How can override bootstrap elemnt ? Thank you. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 27, 2017 Share Posted November 27, 2017 Can you try this?!: function boxready(sender, width, height, eOpts) { var legend=sender.legend.el; legend.dom.setAttribute('align', 'center'); //left, right legend.dom.style['width']="auto"; legend.dom.style['margin-bottom']="0px"; legend.dom.style['border-bottom']="0px"; var legendText=legend.select('.x-fieldset-header-text').elements[0]; legendText.style['color']="green"; legendText.style['font-size']="12px"; legendText.style['font-weight']="bold"; legend.dom.style['text-align']='center'; } Quote Link to comment Share on other sites More sharing options...
Freeman35 Posted November 27, 2017 Author Share Posted November 27, 2017 usual perfect Is any link about dom.style? Thank you so much for help Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 27, 2017 Share Posted November 27, 2017 Is any link about dom.style? https://www.w3schools.com/jsref/dom_obj_style.asp Quote Link to comment Share on other sites More sharing options...
Freeman35 Posted November 27, 2017 Author Share Posted November 27, 2017 Thank you Quote Link to comment Share on other sites More sharing options...
Freeman35 Posted October 11, 2018 Author Share Posted October 11, 2018 On 11/27/2017 at 12:27 PM, Sherzod said: Can you try this?!: function boxready(sender, width, height, eOpts) { var legend=sender.legend.el; legend.dom.setAttribute('align', 'center'); //left, right legend.dom.style['width']="auto"; legend.dom.style['margin-bottom']="0px"; legend.dom.style['border-bottom']="0px"; var legendText=legend.select('.x-fieldset-header-text').elements[0]; legendText.style['color']="green"; legendText.style['font-size']="12px"; legendText.style['font-weight']="bold"; legend.dom.style['text-align']='center'; } In 1480 get error sender.legend undefined anyone have solution about this error ? Thank you Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 11, 2018 Share Posted October 11, 2018 Hello, Works for me Quote Link to comment Share on other sites More sharing options...
Freeman35 Posted October 11, 2018 Author Share Posted October 11, 2018 This is my screenshot, about error. DB aware radiogroup can be different? I'm useing dbradiogroup Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 11, 2018 Share Posted October 11, 2018 It also works for UniDBRadioGroup Quote Link to comment Share on other sites More sharing options...
Freeman35 Posted October 11, 2018 Author Share Posted October 11, 2018 I found problem. If Caption is empty, then get this error. Can you comfirm this? and How to write control code for this? Thank you Quote Link to comment Share on other sites More sharing options...
delagoutte Posted October 11, 2018 Share Posted October 11, 2018 try simply this function boxready(sender, width, height, eOpts) { if (sender.legend) { if (sender.legend.el) { var legend=sender.legend.el; legend.dom.setAttribute('align', 'center'); //left, right legend.dom.style['width']="auto"; legend.dom.style['margin-bottom']="0px"; legend.dom.style['border-bottom']="0px"; var legendText=legend.select('.x-fieldset-header-text').elements[0]; legendText.style['color']="green"; legendText.style['font-size']="12px"; legendText.style['font-weight']="bold"; legend.dom.style['text-align']='center'; } } } Quote Link to comment Share on other sites More sharing options...
Freeman35 Posted October 11, 2018 Author Share Posted October 11, 2018 Thank you, 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.