Oct 28, 2020, 11:54 AM
[CLOSED] FieldSet layout
Hello support team,
I'm struggling to arrange the two fieldsets correctly. The intention is to create a layout where all components are aligned to the window when resized (are resized along with window):
Tested on Ext JS 7.1.0.46 / Ext.NET 5.1.0 and Chrome.
Thank you.
Kind regards
Dan
I'm struggling to arrange the two fieldsets correctly. The intention is to create a layout where all components are aligned to the window when resized (are resized along with window):
@using Ext.Net;
@using Ext.Net.MVC;
@{
ViewBag.Title = "FieldSet Layout";
Layout = null;
var X = Html.X();
}
<!DOCTYPE html>
<html>
<head>
<title>Ext.NET MVC Test Case</title>
</head>
<body>
@(X.ResourceManager())
@X.DisplayField().ID("version").ReadOnly(true).Margin(10).Width(200)
@(X.Window().Width(700).Height(400).Layout(LayoutType.Fit)
.Items(
X.FormPanel()
.BodyPadding(10)
.LayoutConfig(new HBoxLayoutConfig { Align = HBoxAlign.Stretch })
.Items(
X.FieldSet().Title("Account").Flex(1).WidthSpec("100%").Margin(0)
.FieldDefaults(f => f.LabelWidth = 130)
.Items(
X.TextField().WidthSpec("100%"),
X.Checkbox()
),
X.FieldSet().Title("Departments").Flex(1).WidthSpec("100%").MarginSpec("0 0 0 20")
.Layout(LayoutType.VBox)
.Items(
X.Checkbox().HideLabel(true).BoxLabel("Book to all departments"),
X.Container().HeightSpec("100%").WidthSpec("100%")
.LayoutConfig(new HBoxLayoutConfig { Align = HBoxAlign.Stretch })
.Items(
X.GridPanel().Title("Allowed").Flex(1),
X.GridPanel().Title("Available").Flex(1).MarginSpec("0 0 0 10")
)
)
)
)
)
</body>
</html>
<script type="text/javascript">
Ext.onReady(function () {
Ext.getCmp("version").setValue("Ext JS " + Ext.getVersion().version + " / " + "Ext.NET " + Ext.net.Version);
});
</script>
My problem is that I am not able to align the bottom of the grid panels with the fieldset border and part of them goes out of the outline. Please can you help me with that?Tested on Ext JS 7.1.0.46 / Ext.NET 5.1.0 and Chrome.
Thank you.
Kind regards
Dan
Last edited by fabricio.murta; Oct 29, 2020 at 10:40 PM.