View Full Version : ComboBox focus on render...

4 Nov 2009, 8:39 AM
Hey guys,

I have tried all kinds of solutions I've found throughout the forums and I just cannot seem to get this to work.

I have a FormPanel, and within it, a ComboBox.

var cast = new Ext.FormPanel({
labelWidth: 75,
frame: false,
title: 'Add a New Cast Member',
bodyStyle: 'padding: 10px',
width: 350,
defaults: {width: 250},
defaultType: 'textfield',

items: [
new Ext.form.ComboBox({
name: 'name',
id: 'name',
fieldLabel: 'Name',



So I figured using something like the following would be how to get the field focused:

cast.on('show', function() {
Ext.getCmp('name').focus('', 100);

But it doesn't work.

Is there something obvious I am missing here?

7 Nov 2009, 5:30 PM
I hate bumping but I still haven't figured this out. Anyone have a hint?