PDA

View Full Version : [CLOSED] FormPanel field label spacing



RCN
Dec 22, 2014, 4:09 PM
<!DOCTYPE html>
<html>
<head id="Head1" runat="server">
</head>
<body>
<ext:ResourceManager runat="server" Theme="Gray" ScriptMode="Debug" />
<ext:FormPanel Title="Ext.Net 2.x" Margin="10" Width="200" runat="server">
<FieldDefaults LabelAlign="Top" />
<Items>
<ext:TextField FieldLabel="Field 1" AnchorHorizontal="100%" runat="server" />
<ext:TextField FieldLabel="Field 2" AnchorHorizontal="100%" runat="server" />
<ext:TextField FieldLabel="Field 3" AnchorHorizontal="100%" runat="server" />
<ext:TextField FieldLabel="Field 4" AnchorHorizontal="100%" runat="server" />
<ext:TextField FieldLabel="Field 5" AnchorHorizontal="100%" runat="server" />
</Items>
</ext:FormPanel>
</body>
</html>


On version 2.x, the label closer to the field
http://forums.ext.net/attachment.php?attachmentid=17611&stc=1

than on version 3.x
http://forums.ext.net/attachment.php?attachmentid=17621&stc=1

It's possible to overcome the issue above by doing the following:



<!DOCTYPE html>
<html>
<head id="Head1" runat="server">
<style type="text/css">
.x-form-item-label-default {
min-height: 15px !important;
}

.x-form-item-label-top.x-form-item-label-default > .x-form-item-label-inner {
padding-bottom: 0px !important;
}
</style>
</head>
<body>
<ext:ResourceManager runat="server" Theme="Gray" ScriptMode="Debug" />
<ext:FormPanel Title="Ext.Net 3.x" Margin="10" Width="200" runat="server">
<FieldDefaults LabelAlign="Top" />
<Items>
<ext:TextField FieldLabel="Field 1" AnchorHorizontal="100%" runat="server" />
<ext:TextField FieldLabel="Field 2" AnchorHorizontal="100%" runat="server" />
<ext:TextField FieldLabel="Field 3" AnchorHorizontal="100%" runat="server" />
<ext:TextField FieldLabel="Field 4" AnchorHorizontal="100%" runat="server" />
<ext:TextField FieldLabel="Field 5" AnchorHorizontal="100%" runat="server" />
</Items>
</ext:FormPanel>
</body>
</html>


http://forums.ext.net/attachment.php?attachmentid=17631&stc=1

Daniil
Dec 23, 2014, 6:31 PM
Hi Raphael,

Agree, that slight difference might annoy. I think your solution is good.

RCN
Dec 27, 2014, 2:41 AM
Thank you Daniil. Please mark this thread as closed.