Allocating slack to panels
Here are some things to consider when allocating slack to a set of panels:
- How are the panels going to be displayed in a form? For example, are the panels being used as navigation items in a console? You might want to avoid scroll bars so that users can see all the navigation items easily.
- How much content will the panels in a panel holder need to hold? For example, if one panel in a panel holder will have more content than the other panels, you might want to allocate more slack to that panel by giving it the highest distribution order. Panels with less content need less slack and could be given a lower slack distribution order (or could be allocated a negative slack value).
- What type of content will the panels hold? For example:
- If all the panels in a panel holder have the same type of content and the importance of each panel's content is equal, you can allocate the same slack order to all the panels.
- If a panel is used for a list of links, you might want to give that panel more slack and to set the Fit to Content property to True to avoid unneeded white space in the panel and to keep the panel's appearance consistent if links are added or removed.
- If a panel has a table in which you want users to see the content with little or no scrolling, give that panel the highest slack order.
To assign slack order to each panel
- Determine the layout and content needs of each panel.
- In the panel properties, assign an initial, minimum, and maximum size to the panel, or accept the default values.
- Assign a slack distribution order by accepting the default value of 0 or by entering a value between 1 and 100.
- To avoid unneeded white space for a panel given available slack, set the Fit to Content value to True, or accept the default value of False.
- Save the form.
Properties that affect slack allocation
Slack allocation is affected by these properties:
- Maximum Size—Specifies the maximum allowable size for a panel
- Minimum Size—Specifies the minimum allowable size for a panel
- Fit to Content (collapsible panels only)—Determines whether a panel is given slack until its content can be viewed without a scroll bar and with no unused white space:
- True—The panel is given slack until its content is visible without a scroll bar or until the panel reaches its maximum size, whichever is the lesser range.
- False (default)—The panel is given the specified amount of slack until its content can be viewed without a scroll bar. If that amount is more than needed, white space appears in the panel.
For more information about this property, see Avoiding-scroll-bars-in-panels.
At runtime, the slack is allocated to the panels based on the specified slack distribution order.
If the total size of all panels is less than the panel holder's size, the panel has positive slack.
If the total size of all panels is greater than the panel holder's size, the panel has negative slack, and a scroll bar is required on the panel holder to display all the panels.
The following use cases illustrate how positive and negative slack allocation are applied to panels.
Example 1: Positive slack of 150 pixels
In this use case:
- All panels are set to the default properties.
- All panels have the same slack distribution order, so the 150 pixels of available slack is allocated to the last visible panel (for a collapsible panel holder) or the second to last visible panel (for a splitter panel holder).
Example 2: Positive slack of 250 pixels
In this use case:
- Panel 1 has the highest slack distribution order. Panel 1 is allocated 100 pixels of the available slack to equal its maximum size of 200 pixels. The remaining 150 pixels of slack (250 - 100 = 150) is allocated to panel 2.
- Panel 2, with a maximum size of 150 pixels, uses 50 pixels of slack.
- Panel 3, with a maximum size of 200 pixels, is allocated the remaining slack.
Example 3: Negative slack of -50 pixels
In this use case:
- Panel 3 has the lowest slack distribution order, so it is resized to eliminate the negative slack which, in turn, eliminates the scroll bar. A panel is never resized to an amount below its minimum size.
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*