Results 1 to 6 of 6

Thread: Change boxLabel font size

  1. #1

    Default Change boxLabel font size

    I'm using a radiogroup and would like to change the font size of the boxLabel for the RadioGroup items. Tried the cls property but no luck Any ideas?

    Code below:

    {
    xtype:
    'radiogroup',
    fieldLabel:
    'Number Of Users',
    allowBlank:
    false,
    cls:
    'x-test-style',
    width: 250,
    items: [
    { boxLabel:
    '1-10', name: 'num-users', inputValue: 1 } ,
    { boxLabel:
    '10+', name: 'num-users', inputValue: 2 },
    { boxLabel:
    '50+', name: 'num-users', inputValue: 3 },
    { boxLabel:
    '100+', name: 'num-users', inputValue: 4 },
    { boxLabel:
    '1000+', name: 'num-users', inputValue: 5 }
    ]
    },


  2. #2
    Ext JS Premium Member
    Join Date
    Jan 2008
    Posts
    4

    Default

    I want to set the boxLabel to a bold font so I have a similar issue. I know I can do it by manipulating the DOM, but of course that's a hack given that the DOM structure could change in future ExtJS releases. For those who are happy with the hack:

    {
    boxLabel: 'icky-poo',
    xtype: 'radio',
    listeners: {
    'render': function(cb) {
    var boxLabel = Ext.DomQuery.selectNode('LABEL', this.getEl().dom.parentNode);
    boxLabel.style.fontWeight = 'bold';
    }
    }
    }

  3. #3

    Default

    Also have same problem for checkboxes.

    So there is no possibility to change font style of the boxLabel without such DOM manipulating?

  4. #4
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246

    Default

    Configure your checkbox/radio/checkboxgroup/radiogroup with cls:'my-class' and use the following CSS rule:
    Code:
    .my-class .x-form-cb-label {font-weight: bold;}

  5. #5

    Default

    thanks

  6. #6

    Default

    Quote Originally Posted by Condor View Post
    Configure your checkbox/radio/checkboxgroup/radiogroup with cls:'my-class' and use the following CSS rule:
    Code:
    .my-class .x-form-cb-label {font-weight: bold;}
    This is perfect solution for me. Thanks Condor

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •