BorderSpec on Panels

  1. #1

    BorderSpec on Panels

    I'm having difficulty using the .BorderSpec property to style panel borders

    Please see the following example and resulting render

    X.Panel()
        .Layout(LayoutType.Column)
        .Items(
            X.Panel()
            .ColumnWidth(0.65)
            .Title("Width=0.65")
            .Border(false)
            .Items(       
                X.TextArea()
                .ID("testTA")
            )
            ,
            X.Panel()
            .ColumnWidth(0.35)
            .Border(true)
            .BorderSpec("0 1 0 1")
            .Title("Width=0.35")
            .Items(
                X.TextArea()
                .ID("testTA5")
            )
            ,         
            X.Panel()
            .Width(400)
            .Border(false)
            .Title("Metrics")
            .Items(
                X.TextArea()
                .ID("testTA4")
            )
        )
    Click image for larger version. 

Name:	border.png 
Views:	12 
Size:	5.3 KB 
ID:	7238

    Essentially, I want border lines on the left and right of the middle panel, but it seems regardless of the BorderSpec setting, borders are rendered exactly as shown.
  2. #2
    Hello!

    Yes, Border property takes boolean values only, however Sencha says it should take string as well: http://docs.sencha.com/extjs/4.1.3/#...nel-cfg-border

    We reported to Sencha, so let's wait their response.

    For now, try the following:

    @(X.Panel()
        .Layout(LayoutType.Column)
        .Items(
            X.Panel()
            .ColumnWidth(0.65)
            .Title("Width=0.65")
            .Border(false)
            .Items(       
                X.TextArea()
                .ID("testTA")
            )
            ,
            X.Panel()
            .ColumnWidth(0.35)
            .Border(false)
            .Title("Width=0.35")
            .Items(
                X.TextArea()
                .ID("testTA5")
            )
            .CustomConfig(c =>
            {
                c.Add(new ConfigItem("style", "{ borderRight: '10px solid #99BCE8', borderLeft: '10px solid #99BCE8'}", ParameterMode.Raw));
            })
            ,         
            X.Panel()
            .Width(400)
            .Border(false)
            .Title("Metrics")
            .Items(
                X.TextArea()
                .ID("testTA4")
            )
        )
    )

Similar Threads

  1. Draggable panels
    By nagamalli in forum 1.x Help
    Replies: 3
    Last Post: Dec 25, 2014, 9:25 AM
  2. [CLOSED] Draggable Panels
    By mohan.bizbites in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Aug 26, 2013, 9:46 AM
  3. [CLOSED] Two dynamic panels...
    By AmitM in forum 2.x Legacy Premium Help
    Replies: 8
    Last Post: Jun 10, 2013, 3:19 PM
  4. [CLOSED] So many panels and nested panels
    By thchuong in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Aug 03, 2012, 5:23 AM
  5. Disabling Panels
    By Dominik in forum 1.x Help
    Replies: 5
    Last Post: May 13, 2011, 1:18 PM

Posting Permissions