PDA

View Full Version : Bug fieldLabel - ComboBox



michelerosica
30 Jan 2014, 9:08 AM
The combobox has a big problem in FieldLabel.

The biggest problem is the following:
* The space between FieldLabel and combobox is not manageable.
* If we set the size in %, useless space is created between the components.

Example of the problem:
https://fiddle.sencha.com/#fiddle/34l

For this reason I extended a single component able to do more things:
-> fieldCombo (default)|fieldDate|fieldNumber

http://mycode.altervista.org/javascript/examples/SenchaExtJS-4.2.1/ExtendComponent.php

Gary Schlosberg
30 Jan 2014, 9:12 AM
I'm not sure I understand the nature of the bug. Can you please post a Fiddle which reproduces the issue?
https://fiddle.sencha.com/#home

michelerosica
31 Jan 2014, 1:01 AM
Example of the problem:
https://fiddle.sencha.com/#fiddle/34l

Gary Schlosberg
31 Jan 2014, 5:15 PM
Thanks for the test case, and apologies if I missed it in your original post. Also thanks for sharing your code extension.

Are you talking about making the space between label and datefield smaller? If so, you might look at the labelWidth setting.
http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.form.Labelable-cfg-labelWidth

If you are wanting to make it larger, labelPad can help.
http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.form.Labelable-cfg-labelPad

https://fiddle.sencha.com/#fiddle/35d

michelerosica
3 Feb 2014, 12:44 AM
The test01.png shows what can be the problem of space management.
When using the location, management and alignment of space is a problem.

nb: Do not just set padding and size.

Then there is confusion between the size of the label and those of the combobox.
For example, if the size is expressed as a percentage, this result
is not acceptable (Watch test_width.png).

The test02.png, test03.png and test04.png use my extension and behave well in each case.