Why can not the checkbox get the focus?

By smith | March 13, 2010

  • I am trying to let the checkbox get the focus. It always fails.who can help me?

    Ext.onReady(function() {
    Ext.QuickTips.init();
    Ext.form.Field.prototype.msgTarget = 'side';
    // Fix 2.1 bug
    Ext.override(Ext.layout.FormLayout, {
    getAnchorViewSize : function(ct, target) {
    return (ct.body ct.el).getStyleSize();
    }
    });
    var cc = Ext.apply({
    item :
    }, {
    sdf : 'sd'
    });
    alert(cc.toString());
    new Ext.form.FormPanel({
    renderTo : document.body,
    title : "Frequency",
    border : false,
    renderto : Ext.getBody(),
    bodyStyle : "padding: 8px; background-color: transparent;",
    labelAlign : "left",
    labelWidth : 150,
    autoScroll : true,
    defaultType : "textfield",
    items : [{
    xtype : "fieldset",
    autoHeight : true,
    title : "One-Time",
    layout : "column",
    items : [{
    xtype : 'container',
    autoEl : {},
    columnWidth : 0.5,
    layout : 'form',
    items : new Ext.form.DateField({
    autoCreate : {
    tag : "input",
    type : "text",
    size : 8
    },
    fieldLabel : "Start Date",
    blankText : "Start Date...",
    format : "Y-m-d",
    value : ""
    // ,
    // disabled : true
    })
    }, {
    xtype : 'container',
    autoEl : {},
    columnWidth : 0.5,
    layout : 'form',
    defaultType : 'textfield',
    items : [{
    fieldLabel : 'Field 3'

    }, {
    fieldLabel : 'Field 4'

    }, {
    xtype : "checkbox",
    name : "msi1",
    id : "VenderMaintance_MSI1",
    // dataIndex : "msi",
    width : 100,
    allowBlank : true,
    // labelSeparator : ':*',
    fieldLabel : "MSI",
    insert_allowed : true,
    update_allowed : true,
    handler : function() {
    Ext.getCmp("VenderMaintance_MSI")
    .focus();
    }
    }, {
    xtype : "checkbox",
    name : "msi",
    id : "VenderMaintance_MSI",
    // dataIndex : "msi",
    width : 100,
    allowBlank : true,
    // labelSeparator : ':*',
    fieldLabel : "MSI"

    }

    ]
    // new Ext.form.DateField({
    // autoCreate : {
    // tag : "input",
    // type : "text",
    // size : 8
    // },
    // fieldLabel : "Start Date",
    // blankText : "Start Date...",
    // format : "Y-m-d",
    // value : "",
    // disabled : true
    // })
    }]
    }, {
    xtype : "fieldset",
    title : "Recurring"
    }]
    });
    });


  • I am so stupid. I found the solution in the forums. http://extjs.com/forum/showthread.php?t=44603 (http://extjs.com/forum/showthread.php?t=44603)
    thanks for http://extjs.com/forum/image.php?u=343&dateline=1199090082 (http://extjs.com/forum/member.php?u=343) Condor (http://extjs.com/forum/member.php?u=343)







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about Why can not the checkbox get the focus? , Please add it free.

    Topics: enart.zjbr.com | edit

    Theming: Apply a class to All Individual Parts of a Component? ComboBox Cannot Be Modified Once Item Selected