PDA

View Full Version : [CLOSED] right panel set width 100% [Razor]



boris
Apr 24, 2012, 10:07 AM
Hi, can you help me how to set width 100% to my right panel (pnlAAA2) in this example. I have one panel in which I have two panels (left - pnlAAA1 and right - pnlAAA2). Left panel have fixed width 200. For right panel I need to fill remaining area from left panel to right edge of browser.


@(Html.X().Panel().ID("pnlAAA").Title("A").Layout(LayoutType.HBox)
.Items(items => {
items.Add(Html.X().Panel().ID("pnlAAA1").Width(200).Title("A1")
.Items(itemsA1 => {
itemsA1.Add(Html.X().Button().ID("bAAA1").Text("A1 button"));
itemsA1.Add(Html.X().Button().ID("bBBB1").Text("B1 button"));
}));
items.Add(Html.X().Panel().ID("pnlAAA2").Layout(LayoutType.Anchor).Title("A2")
.Items(itemsA2 => {
itemsA2.Add(Html.X().Button().ID("bAAA2").Text("A2 button"));
itemsA2.Add(Html.X().TextField().ID("txtA2").FieldLabel("Text field A2").Width(200).LabelWidth(100));
}));
})
)

Daniil
Apr 24, 2012, 11:08 AM
Hi,

Please set up

.Flex(1)
for that Panel.

boris
Apr 24, 2012, 11:14 AM
That is solution! Thanks!