Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext JS Premium Member
    Join Date
    Mar 2011
    Location
    Aachen, Germany
    Posts
    47
    Vote Rating
    0
    SommerEngineering is on a distinguished road

      0  

    Exclamation [CLOSED] [4.0.1] labelEl does not work for Ext.form.field.Checkbox

    [CLOSED] [4.0.1] labelEl does not work for Ext.form.field.Checkbox


    For an object of the type Ext.form.field.Checkbox, the property labelEl returns always null. The same property for an Ext.form.field.Radio returns the correct object.

    Workaround:
    I was trying to color the label red. For Ext.form.field.Checkbox I use now that:
    myObject1.bodyEl.applyStyles("color: #ff0000");

    For the Ext.form.field.Radio it works correct:
    myObject2.labelEl.applyStyles("color: #ff0000");
    -->

  2. #2
    Sencha User mberrie's Avatar
    Join Date
    Feb 2011
    Location
    Bangkok, Thailand
    Posts
    506
    Vote Rating
    14
    mberrie will become famous soon enough mberrie will become famous soon enough

      0  

    Default


    Sorry, I cannot verify this. Are you sure you have a reference to the correct Ext object in both cases (Component vs Element)?

    Check this out:

    Code:
    <html>
    <head>
        <title></title>
        <meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8"/>
        <link rel="stylesheet" type="text/css" href="ext/resources/css/ext-all.css"/>
        <!--<script type="text/javascript" src="ext/bootstrap.js"></script>-->
        <script type="text/javascript" src="ext/ext-debug.js"></script>
        <script type="text/javascript">
            Ext.Loader.setConfig({
                enabled: true,
                disableCaching: false,
                paths: {
                    'Ext': 'ext/src'
                }
            });
    
            Ext.onReady(function() {
                function blush(cmp) {
                    cmp.labelEl.applyStyles("color: #ff0000");
                }
    
                Ext.create('Ext.form.Panel', {
                    renderTo: Ext.getBody(),
                    items : [
                        {
                            xtype : 'checkbox',
                            fieldLabel: 'Checkbox',
                            listeners : {
                                change : blush
                            }
                        },
                        {
                            xtype : 'radio',
                            fieldLabel: 'Radio',
                            listeners : {
                                change : blush
                            }
                        }
                    ]
                });
            });
        </script>
    
    </head>
    <body>
    </body>
    </html>
    -->

  3. #3
    Ext JS Premium Member
    Join Date
    Mar 2011
    Location
    Aachen, Germany
    Posts
    47
    Vote Rating
    0
    SommerEngineering is on a distinguished road

      0  

    Lightbulb


    Ah, thank you for the exampel. I found my mistake I used for the checkbox NOT the fieldLabel, I used boxLabel instead. If you using boxLabel, the labelEl does not work. I using now boxLabelEl.applyStyles()

    Good news: No bug at all
    -->

Thread Participants: 1

Tags for this Thread