Jump to content

About TUniRadioGroup.Caption


Freeman35

Recommended Posts

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,

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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';
}
Link to comment
Share on other sites

  • 10 months later...
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

Link to comment
Share on other sites

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';
    }
  }
}

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...