Mar 10, 2021, 3:18 PM
[CLOSED] FieldContainer - alignment of child components
Hello, support team,
in the following example, I am not able to align the components in the
Various layout configurations are used to demonstrate the issue:
Thank you.
Kind regards
Dan
in the following example, I am not able to align the components in the
FieldContainer
to fit its owner. In this particular case, there is always a gap between the bottom border of the TextArea
and its parent container.Various layout configurations are used to demonstrate the issue:
@using Ext.Net;
@using Ext.Net.MVC;
@{
ViewBag.Title = "Field container";
Layout = null;
var X = Html.X();
var N = Html.N();
}
<!DOCTYPE html>
<html>
<head>
<title>Ext.NET MVC Test Case</title>
</head>
<body>
@X.ResourceManager()
@(X.Container().LayoutConfig(new HBoxLayoutConfig { Align = HBoxAlign.Stretch }).Width(800).Height(100).Margin(10)
.Items(
X.FieldContainer().Layout(LayoutType.Anchor).Flex(1)
.Items(
X.Toolbar(),
X.TextArea().AnchorVertical("100%").AnchorHorizontal("100%")
),
X.TreePanel().Title("Macros").Width(300).MinWidth(150).MaxWidth(400).Collapsible(true).CollapseDirection(Direction.Right).Split(true)
)
)
@(X.Container().LayoutConfig(new HBoxLayoutConfig { Align = HBoxAlign.Stretch }).Width(800).Height(100).Margin(10)
.Items(
X.FieldContainer().LayoutConfig(new VBoxLayoutConfig { Align = VBoxAlign.Stretch }).Flex(1)
.Items(
X.Toolbar(),
X.TextArea().Flex(1)
),
X.TreePanel().Title("Macros").Width(300).MinWidth(150).MaxWidth(400).Collapsible(true).CollapseDirection(Direction.Right).Split(true)
)
)
@(X.Container().Layout(LayoutType.HBox).Width(800).Height(100).Margin(10)
.Items(
X.FieldContainer().LayoutConfig(new VBoxLayoutConfig { Align = VBoxAlign.Stretch }).Flex(1).HeightSpec("100%")
.Items(
X.Toolbar(),
X.TextArea().Flex(1)
),
X.TreePanel().Title("Macros").HeightSpec("100%").Width(300).MinWidth(150).MaxWidth(400).Collapsible(true).CollapseDirection(Direction.Right).Split(true)
)
)
@(X.Container().Layout(LayoutType.Border).Width(800).Height(100).Margin(10)
.Items(
X.FieldContainer().LayoutConfig(new VBoxLayoutConfig { Align = VBoxAlign.Stretch }).Region(Region.Center)
.Items(
X.Toolbar(),
X.TextArea().Flex(1)
),
X.TreePanel().Title("Macros").Region(Region.East).Width(300).MinWidth(150).MaxWidth(400).Collapsible(true).CollapseDirection(Direction.Right).Split(true)
)
)
</body>
</html>
How to make the bottom edge of a TextArea
aligned just like a TreePanel
?Thank you.
Kind regards
Dan
Last edited by fabricio.murta; Mar 10, 2021 at 9:52 PM.