[Layouts] Which layout(s) for this app ?
July 4th, 2009
I used to deal with Java layouts in the past but Ext implementation of layouts seems to be different in many ways.
Ext API is not a very good start for beginners so I'm asking for some advices on how to build my app (see attachment below).
I also had a look to the "Ext 2.0 Gui Designer" but prefer understanding what I'm doing by learning how to do it.
Ext Gui Designer is a user created project, its not a supported application for designing you're layouts.
The Ext API is very simple if you just take the time to read and look into things, if i can grasp it and create a working app then anyone can ;)
Some details I forgot are:
- Main window is resizable
- When resizing the window, I'd like TextField and TabPanel to fill free space automatically, same in the opposite way...
- The sending button has to keep its initial size.
Phunky, I'm gone a give a try to the proposition you just made.
Now I'm wondering how to position the send button on the right side of the TextField keeping the current resizing behaviour, any idea ?
Then each column container contains the inupt elements a TextField and a Button.
However, I tried the solution you gived and still got a problem.
Here is the concerned part of the code:
// TextField
imTextField = new Ext.form.TextField({
region: 'center'
});
// Sending button
imSendBtn = new Ext.Button({
region: 'east'
});
// Container for the 2 widgets above
imInputPane = new Ext.Panel({
layout: 'border',
region: 'south', // Position in the main window (border layout too)
items: [
imTextField,
imSendBtn
]
});
imMainWindow = new Ext.Window({
layout: 'border',
items: [
imTabPane,
imInputPane
],
});
When running this code, content of the imInputPane is not displayed. I can only see its header if I set one, but the TextField and sending Button are not visible.
Don't bother creating Panels, just use config objects and xtypes.
#If you have any other info about this subject , Please add it free.# |