Use the PanelBar.ExpandMode property to determine the operation of the PanelBar expand/collapse behavior.

In order to make a traditional "Outlook Bar" where only a single group is expanded at a time, the height of the entire PanelBar is predetermined or dynamic, and the Items within a panel are capable of scrolling if clipped, set:


Static PanelBar Height

To control the static height of the PanelBar bar in this mode, there are two properties that work in conjuction with each other:


Typically, you will only be concerned with setting the Height property. SectionHeight will dynamically stretch to occupy the necessary space in order to acheive the desired overall Height, as seen here.

In some instances, such as when PanelBar is being dynamically populated with an unknown number of Groups, you will want to set the SectionHeight to enforce a minimum expanded section area. SectionHeight will still stretch to occupy any extra space, but cannot be made smaller than the SectionHeight value. In that case, the overall Height of the PanelBar will adjust as seen here:

Dynamic PanelBar Height

Height can also be controlled dynamically in the browser using two techniques. One is the AutoSizeToFrame property:


The other is the client-side cspbSetHeight(px) function that you can control via browser script.

Both dynamic size techniques are also demonstrated among the samples installed with the product.


Copyright © Coalesys, Inc.