[CLOSED] panel not move with the border panel

  1. #1

    [CLOSED] panel not move with the border panel

    Hi, I have west & center panels. the initial display looks good. but when I drag the west panel, the panel inside west panel doesn't fit in the border panel any more. I have try many different layout type, won't help. Any idea?
    Thanks
    -susan zhang

    Border panel setup:


    @{
        var X = Html.X();
    }
    
    @model ExtNetTest.ViewModels.GridViewModel
    
    
    @(
     Html.X().DesktopModuleProxy()
            .Module(
                Html.X().DesktopModule()
                    .ModuleID(Model.GridID)
                    .Shortcut(
                        Html.X().DesktopShortcut()
                            .Name(Model.Title)
            //.IconCls("x-notepad-shortcut")
            //.SortIndex(1)
                    )
                    .Launcher(
                        Html.X().MenuItem()
                            .Text(Model.Title)
                            .Icon(Icon.ApplicationEdit)
                    )
                    .Window(
                        Html.X().Window()
                            .Icon(Icon.ApplicationEdit)
                            .Width(800)
                            .Height(500)
                            .Plain(true)
                            .Layout(LayoutType.Border)
                            .Title(Model.Title)
                            .Items(
                                    X.Panel()
                                        .Title("Dimension Filter Selector")
                                        .Region(Region.West)
                                        .Floatable(false)
                                        .Width(200)
                                        .Collapsed(false)
                                        .Split(true)
                                        .Collapsible(true)
                                        //.BodyPadding(5)
                                        .ItemsFromAction("DemensionFilterSelectorPanel", "Grid", new { gridID = 12}), //Model.GridIDInt }),
                                  
                                 X.Panel()
                                       .Region(Region.Center)
                                 
                            ) // end items
                   )//end window
              ) //end module
    
    )
    Controller:
    public ActionResult DemensionFilterSelectorPanel(string gridID)
            {
                return PartialView("_DemensionFilterSelectorPanel", gridID);
            }
    _DemensionFilterSelectorPanel.cshtml:

    @{
        var X = Html.X();
    }
     
    @(X.Panel()
           // .BodyBorder(0)
            .Layout (LayoutType.Anchor)
            .DefaultAnchor("100%")
            //.Frame(true)
            //.Icon(Icon.ApplicationTileVertical)
            //.Layout(LayoutType.Fit)
            //.LayoutConfig(new VBoxLayoutConfig { Align = VBoxAlign.Stretch })
            .TopBar(
                X.Toolbar()
                    .Items(
                        X.Button()
                            .Icon(Icon.Accept)
                            //.ToolTips(t => t.Add(
                            //    X.ToolTip()
                            //        .Title("Rich ToolTips")
                            //        .Html("Save")),
                        ,    
                        X.Button()
                            .Icon(Icon.DatabaseSave)
                        ,
                        
                        X.Button()
                            .Icon(Icon.Delete)
                        ,
                            
                        X.Button()
                            .Icon(Icon.Star)
                            
                    )
            )
            .Items(
                    X.Panel()
                      .Title("Filters")
                      .Layout(LayoutType.Fit)
                      .Collapsed(false)
                      .Collapsible(false)
                      .Items(
                       // X.Button().Text("test"),
                        X.ComboBox()
                            .Items(
                                new ListItem("xxx", "be"),
                                new ListItem("yyy", "he")
                                )
                     )
                    ,
                    X.Panel()
                      .Items (
                    X.TreePanel()
                    .Title("Online Users")
                    .RootVisible(false)
                    .Tools(X.Tool()
                        .Type(ToolType.Refresh)
                        .Handler("Ext.Msg.alert('Message','Refresh Tool Clicked!');")
                    )
                    .Root(X.Node()
                        .Text("Root")
                        .Children(
                            X.Node()
                                .Text("Friends")
                                .Expanded(true)
                                .Children(
                                    X.Node().Text("Jack").Icon(Icon.User).Leaf(true),
                                    X.Node().Text("Brian").Icon(Icon.User).Leaf(true),
                                    X.Node().Text("Jon").Icon(Icon.User).Leaf(true),
                                    X.Node().Text("Tim").Icon(Icon.User).Leaf(true),
                                    X.Node().Text("Brent").Icon(Icon.User).Leaf(true),
                                    X.Node().Text("Fred").Icon(Icon.User).Leaf(true),
                                    X.Node().Text("Bob").Icon(Icon.User).Leaf(true)
                                ),
    
                            X.Node()
                                .Text("Family")
                                .Expanded(true)
                                .Children(
                                    X.Node().Text("Kelly").Icon(Icon.UserFemale).Leaf(true),
                                    X.Node().Text("Sara").Icon(Icon.UserFemale).Leaf(true),
                                    X.Node().Text("Zack").Icon(Icon.UserGreen).Leaf(true),
                                    X.Node().Text("John").Icon(Icon.UserGreen).Leaf(true)
                                )
                        )// end childen
                    )//end root
                    )
            )// end items
        )
    Last edited by Daniil; Oct 17, 2014 at 2:52 PM. Reason: Please use [CODE] tags, [CLOSED]
  2. #2
    Hi @susanz,

    I would try to set
    .Layout(LayoutType.Fit)
    for the West region.
  3. #3
    That works! Thanks Daniil.
    -sz

Similar Threads

  1. [CLOSED] [MVC] Move panel with js function
    By Tactem in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Oct 03, 2013, 2:03 PM
  2. Change the panel's color border
    By equiman in forum 2.x Help
    Replies: 10
    Last Post: May 02, 2013, 7:15 PM
  3. [CLOSED] Move the grid panel into panels.
    By speedstepmem3 in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Nov 10, 2011, 5:50 AM
  4. [CLOSED] Border Panel
    By majunior in forum 1.x Legacy Premium Help
    Replies: 13
    Last Post: Jun 21, 2011, 6:33 PM
  5. Panel border
    By angelolsantos in forum 1.x Help
    Replies: 0
    Last Post: Mar 02, 2009, 3:53 PM

Tags for this Thread

Posting Permissions