Home > Uncategorized > SectionStack without +/- icon

SectionStack without +/- icon

November 9, 2009

Working on my latest project, I wanted a sectionStack on the left side of the window. Having been exposed to Outlook too long, I didn’t like the +/- icons shown on the section headers. Searching the SmartClient forums didn’t result in a workaround. Setting canCollapse: false will hide the icon but then clicking on the header doesn’t do anything. After many attempts, I settled on the following. Set canCollapse: false on each section and handle the click event to trigger the default header click action that occurs when canCollapse is true.

    canCollapse:false,
    click : function() {
        var layout = this.getLayout();
        if (!layout) return;
        return layout.sectionHeaderClick(this);
    }

Edit: 2009/11/10 – As reported by Sanjiv, there is a new v7.0 section property, showExpandControls, that can be used in place of canCollapse to remove the +/- icon but still allow the section to be expanded or collapsed by a header click. Seeing this would have saved me a great deal of time but I just missed it…

About these ads
Tags:
  1. Sanjiv Jivan
    November 10, 2009 at 10:30 am | #1

    SectionStack.setShowExpandControls was just added to SmartClient.

Comments are closed.
Follow

Get every new post delivered to your Inbox.

%d bloggers like this: