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

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...