VFW010 A Tab Folder Framework

VLF Windows Application Development

VFW010 – A Tab Folder Framework

Tab Folders

The Tab folder control has advanced docking, undocking and autohide features that can be used to transform a single Tab folder into a Tab framework application with virtual Tab folders attached to various parts of the window.

The virtual Tab folders can be automatically hidden (auto hide) and Tab sheets can be moved and attached to other parts of the screen (undock and dock).

The Tab folder properties manage the appearance of the framework and the individual Tab sheets manage the position and layout of a page in the tab framework.

The following Tab sheet properties are used:

    DockPosition

     Use the DockPosition property to specify where the Tab sheet is attached. The Tab sheet can be docked to the Center, Left, Right, Bottom or Top of the screen. Using the DockPosition properties of Tab sheets you can construct a tab framework application from a single Tab folder.

    DockAllowUndock

     Use the DockAllowUndock property to specify if the Tab sheet can be moved away (undocked) from the Tab folder. This property can be set to True or False. When this property is True, a docking bar (a double line) is displayed on the Tab sheet. To undock the Tab sheet, the user drags it by the docking bar.

    DockCloseButton

     Use the DockCloseButton property to specify whether a Close button is displayed in the Tab sheet. When a Tab sheet has a Close button, it can be closed. This property can be set to True or False.

    DockAllowPositions

     Use the DockAllowedPositions property to specify which part of the screen the Tab sheet can be attached to (docked). The values are Right, Top, Bottom and None. All positions can be selected. None overrides the multi-select options and specifies that the TabSheet cannot be docked anywhere. Note that this property applies to user interaction only and has no bearing on programmatic changes. Therefore a TabSheet with DockPosition(Left) and DockAllowedPositions(None) will appear as a DockLeft TabSheet.

Objectives

  • The previous exercise demonstrated only the basic features of tab folders and tab sheets.
  • This exercise uses some of the more advanced tab folder behaviour.

To achieve these objectives, you will complete the following:

Step 1. Create a Form

Step 2. Define a Tab Folder Framework

Step 3. Compile and Execute the Form

Summary

Before You Begin

Complete the Simple Tab Folder exercise in VFW005.