Results 1 to 2 of 2

Thread: Checkbox not checked by default

Hybrid View

Previous Post Previous Post   Next Post Next Post
    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Dec 2008
    Location
    France
    Posts
    244
    Vote Rating
    0
      0  

    Default Checkbox not checked by default

    Hello,

    I've a checkbox i want to be checked by default.
    But it doesn't work.

    My code which doesn't check the checkbox (i give very simple example, without all the config of my formpanel) :
    Code:
        var my_form = new Ext.FormPanel({
            hidden: 'true',
            items: [{
                columnWidth: 0.55,
                defaults: {labelStyle: 'font-weight:bold; color:#990033;'},
                items: [{
                    checked: true,
                    xtype: 'checkbox'
                }],
                layout: 'form',
                xtype: 'panel'
            }],
            layout: 'column'
        });

    If the hidden property of my_form is set to false, it's OK.
    If the hidden property of my_form is set to true, and after with some code i show the my_form, the checkbox appears not checked.

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,390
    Vote Rating
    498
      0  

    Default

    This works for me:

    Code:
        var my_form = new Ext.FormPanel({
            hidden: true,
            title: 'form',
            height: 100,
            width: 200,
            items: [{
                xtype: 'checkbox',
                fieldLabel: 'check',
                checked: true,
            }],
            renderTo: Ext.getBody()
        });
        
       my_form.setVisible(true);
    Regards,
    Scott.

Posting Permissions

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