Results 1 to 6 of 6

Thread: checkboxgroup: change style of fieldlabel?

  1. #1
    Sencha User
    Join Date
    Mar 2013
    Posts
    10
    Answers
    1
    Vote Rating
    0
      0  

    Default Answered: checkboxgroup: change style of fieldlabel?

    Hi, how can I change the style of the fieldlabel of a checkboxgroup? I can do

    Code:
    checkboxgroup.getEl().setStyle()
    but that changes the style (e.g. color) for the whole thing, not just the fieldlabel.

    Thanks

  2. Solved it using a combination of Ext.get and setStyle(). The label can be identified by its id, it has the appendix -labelEl.

  3. #2
    Touch Premium Member
    Join Date
    Jun 2011
    Posts
    1,101
    Answers
    113
    Vote Rating
    100
      0  

    Default

    one way is to use tags directly in the label text. E.g.

    Code:
    fieldLabel: '<b>Test</b>',
    or you could add a span with a class and define the class in your stylesheet.

  4. #3
    Sencha User
    Join Date
    Mar 2013
    Posts
    10
    Answers
    1
    Vote Rating
    0
      0  

    Default

    Thanks, but I would need a dynamic version, i.e. I want to change the style programmatically.

  5. #4
    Sencha User
    Join Date
    Sep 2011
    Posts
    574
    Answers
    59
    Vote Rating
    74
      0  

    Default

    Group is decorated with Labelable mixin, that has several settings for customizing label, e.g. labelStyle.

  6. #5
    Sencha User
    Join Date
    Mar 2013
    Posts
    10
    Answers
    1
    Vote Rating
    0
      0  

    Default

    I am sorry, but I'm lost. I see
    HTML Code:
    labelStyle
    can be set in the config, but is there an interactive version, like a method I can call, e.g.
    HTML Code:
    setLabelStyle
    ?

  7. #6
    Sencha User
    Join Date
    Mar 2013
    Posts
    10
    Answers
    1
    Vote Rating
    0
      0  

    Default Solved

    Solved it using a combination of Ext.get and setStyle(). The label can be identified by its id, it has the appendix -labelEl.

Tags for this Thread

Posting Permissions

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