Success! Looks like we've fixed this one. According to our records the fix was applied for
a recent build.
FieldContainer hbox layout is extremely recalcitrant
I'm trying to use a FieldContainer with the layout set to hbox so that each text field will be on the same line. My problem is that in addition to having to hard-code a height in order to see items within it, as soon as I set a "margin: 0 5 0 0" for the first two (of three) text boxes, those two text boxes instantly become taller than the remaining text box. I've attached the project here to make it easier than trying to paste it within this post.
How can I create a FieldContainer in Ext Designer with three text boxes all on the one line, and so that each text box is the same height (with that height being the normal default height for text fields)? I've re-done this FieldContainer a dozen times today (it seems) because as soon as I try something, it suddenly won't show anything in it and I have to start all over again. I'm at a loss to try to get this to behave the same as the FieldContainer Example.
Whats your version of Designer?
I am using 1.2.2 and am able to set margins on the fields. See if attached project works for you.
I guess my point was that they're very fiddly to setup right. For starters the height is 120 by default, and if you don't set it to about 22 the fields look way bigger than the rest. If it's set to hbox/stretch/start|end then I would have thought it should be as high as the items within it rather than having to play with the height of the field container to make it look like all the others (see attached). And you have to specify a margin - even 0 - on the last field or else it's not as tall as the others with right margins. Maybe this could be improved in a future version down the track? I'm using 1.2.2 build 48.
I've also found that a hbox layout for a simple container with buttons in it looks OK in Designer, but if you save and exit and come in again, the buttons are mostly off the edge/invisible and you have to set the layout on the container to auto and back to hbox again to get them to show the way they did successfully before (added to attached XDS file, too). The hbox layout seems a bit buggy in designer at the moment.
I see the same problem... I'm using Designer 1.2.2.r48
Hbox is very buggy right now...
It makes me not want to use it.
Perfection as a goal is a nice idea that can point one in a specific direction. However, since "perfection" is an ever changing (evolving?) and moving target, one must admit that perfection
can never be obtained...
When in doubt, check the d4mn source code!
And here are my terms...
- I don't care if you use my source code. (Known as "Code.")
- I don't care if I get any monetary compensation.
- I do care to receive credit for Code provided. So, please keep my name in the comments for Code provided.
- Code is provided without warranty "AS-IS" and I claim absolutely no warranty nor liability to the quality, security, and run-ability on any platform.
- By using Code, you accept all risk inherit with Code regardless if Code has known and yet to be discovered bugs.
- You are welcome to change and improve the Code to best meet your needs.
- I don't care if you use the Code in a commercial or open-source project.
- You are not required to contact me prior to using the Code.
Guys this looks like a bug, I'm moving to the bug forums and logging it into our system. Thanks for the bug report.
It seems that items in a hbox are spontaneously sprouting a "flex: 1" attribute after opening a project that was saved when the hbox looked fine.
With regard to the buttons:
When you add those buttons into an hbox container it's going to give them flex 1 by default. If you remove the flex (click the x next to it) Designer will respect your wish to not have a flex. This is different than removing the 1 (backspace). I agree that this is not documented and not intuitive and potentially needs addressing.
With regard to wanting default height fields in your hbox container:
If you want this to occur you'll need to set alignment of the container to something other than stretch or stretchmax. This is by design