newbie
21 May 2007, 1:50 AM
hello,
I just started to use this nice library but have been into several bottlenecks.
I checked out most of the forums but couldn't find the answers.
Please be patient with me as I'm learning this now.
I'm trying to get a dialog box with several input fields. Nothing was shown in the dialog box. I think it was because of 'layoutdlg' in form_employee.render('layoutdlg'); but I don't know what to put it there for this case.
var dlg = new Ext.LayoutDialog("layoutdlg", {
autoCreate : true,
modal:true,
width:300,
height:200,
minWidth:100,
minHeight:100,
syncHeightBeforeShow: true,
shadow:true,
fixedcenter:true,
center: {
autoScroll:true,
tabPosition: 'top',
closeOnTab: true,
alwaysShowTabs: true
}
});
var form_employee = new Ext.form.Form({
labelAlign: 'right',
labelWidth: 175});
var employee_name = new Ext.form.TextField({
fieldLabel: 'Name',
name: 'name',
width:190
});
form_employee.fieldset(
{legend:'Employee Edit'},
employee_name
);
form_employee.render('layoutdlg');
dlg.show();
I also tried to use the layout but I'm not sure how to put input textfield into the content panel.
var cDlgContentPanel = new Ext.ContentPanel('center');
var layout = dlg.getLayout();
layout.beginUpdate();
layout.add('center', new Ext.ContentPanel('center', {title: 'The First Tab'}));
layout.endUpdate();
If I may, I'd like to ask another quesiton. For Tree.TreePanel, is there any way to get the focus back to this control after it loses its focus? After a Confirm message box or even a TreeEditor gets the focus, the tree control loses the focus. The user has to click on the tree again to regain the focus. In IE, the shortkeys (created by tree.getEl().addKeyListener) on tree stop working and I can't get it work at all once the tree contol loses its focus. In firefox, if the user clicks on the tree, the shortkeys work fine. Any suggestions?
Thank you very much for your kind help in advance.
I just started to use this nice library but have been into several bottlenecks.
I checked out most of the forums but couldn't find the answers.
Please be patient with me as I'm learning this now.
I'm trying to get a dialog box with several input fields. Nothing was shown in the dialog box. I think it was because of 'layoutdlg' in form_employee.render('layoutdlg'); but I don't know what to put it there for this case.
var dlg = new Ext.LayoutDialog("layoutdlg", {
autoCreate : true,
modal:true,
width:300,
height:200,
minWidth:100,
minHeight:100,
syncHeightBeforeShow: true,
shadow:true,
fixedcenter:true,
center: {
autoScroll:true,
tabPosition: 'top',
closeOnTab: true,
alwaysShowTabs: true
}
});
var form_employee = new Ext.form.Form({
labelAlign: 'right',
labelWidth: 175});
var employee_name = new Ext.form.TextField({
fieldLabel: 'Name',
name: 'name',
width:190
});
form_employee.fieldset(
{legend:'Employee Edit'},
employee_name
);
form_employee.render('layoutdlg');
dlg.show();
I also tried to use the layout but I'm not sure how to put input textfield into the content panel.
var cDlgContentPanel = new Ext.ContentPanel('center');
var layout = dlg.getLayout();
layout.beginUpdate();
layout.add('center', new Ext.ContentPanel('center', {title: 'The First Tab'}));
layout.endUpdate();
If I may, I'd like to ask another quesiton. For Tree.TreePanel, is there any way to get the focus back to this control after it loses its focus? After a Confirm message box or even a TreeEditor gets the focus, the tree control loses the focus. The user has to click on the tree again to regain the focus. In IE, the shortkeys (created by tree.getEl().addKeyListener) on tree stop working and I can't get it work at all once the tree contol loses its focus. In firefox, if the user clicks on the tree, the shortkeys work fine. Any suggestions?
Thank you very much for your kind help in advance.