Jump to content
uniGUI Discussion Forums
Freeman35

About TUniRadioGroup.Caption

Recommended Posts

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

Share this post


Link to post
Share on other sites

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,

Share this post


Link to post
Share on other sites

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

 

 

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

Hello,

 

 

Which browser are you using?

Win 10 -> Firefox 57(quantum), Edge

Mac OS Firefox 57(Quantum), Safari, Opera

same all of them

Share this post


Link to post
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.

Share this post


Link to post
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';
}

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

This is my screenshot, about error. DB aware radiogroup can be different? I'm useing dbradiogroup

Ekran Resmi 2018-10-11 15.41.09.png

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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';
    }
  }
}

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×