View Full Version : [CLOSED] [2.1] From panel field's width incorrect behaviour

Sep 04, 2012, 9:53 AM

Please, review code sample below. It is looks like Width property sets width for field with label, not for field itself. For example, we set Width = 200 for combobox, which has LabelWidth = 95, LabelPad = 5, then width of the combobox would be (200 - 95 - 5) = 100. It seems for me like a bug.

Is it a bug? Or this works as designed?

<ext:FormPanel runat="server">
<ext:ConfigItem Name="LabelWidth" Value="120" Mode="Raw" />
<ext:ComboBox runat="server" Width="100" FieldLabel="Combo without container" />
<ext:FieldContainer runat="server" FieldLabel="Combo in container">
<ext:ComboBox ID="ComboBox1" runat="server" Width="100" />

Best regards.

Sep 04, 2012, 10:24 AM
No, it is designed behaviour. Field is not input element only, it is label, note, error messages, indicator and triggers

Sep 04, 2012, 10:29 AM

Here is the Docs article about Width.

The width of this component in pixels.

A FieldLabel is a part of the ComboBox component. So, the width of FieldLabel is a part of ComboBox Width.

You can specify a width for an <input> part of the field setting the ComboBox InputWidth property.

Please note this property was added just a few days ago.

If it is absent in your dlls, please update from SVN or set it via CustomConfig.

Sep 04, 2012, 12:25 PM
Thank you for clarification.