32 Understanding Tab and Tab Page Controls

This chapter contains the following topics:

This chapter provides an overview of tab and tab page controls, and discusses how to create tab controls.

32.1 Understanding Tab and Tab Page Controls

You can create a control that enables you to split a form into different tabbed pages. Tabs enable you to use multiple controls on a single form. You can group the control functions by placing related controls on different tab pages for a single form. You can cut and paste controls from one page to other pages.

The form has a single business view (BV). One commit for the form exists on the OK button. You can use system functions such as Set Focus to add additional functions for the tab controls. Each tab page has a Tab Page is Selected event and a Tab Page is Initialized event associated with it. You can attach additional event rule logic to these events. When you use tab pages in an application, you can focus on the upper-right corner of the tab page and move it around. This strategy enables you to see several pages at the same time.

Additionally, you can embed or reuse subforms on a tab page, or you can specify a subform to act as the tab page itself.

32.2 Creating Tab Controls

This section discusses how to create a tab control.

32.2.1 Creating a Tab Control

To create a tab control:

  1. On the form with which you are working, select Tab Control from the Insert Controls tool bar.

    Page Properties appears. It indicates which page of information you are on.

  2. Complete the Event Rules Title.

    The form appears with a tab at the top, named as you indicated.

  3. Position and resize the control.

  4. Select Tab Page from the Insert Controls tool bar to add additional tab pages, as necessary.

    The size of each page in the tab control is equal to the size of the entire tab control. You cannot resize an individual page to be bigger or smaller than the others.

    All tab pages appear as children of the tab control in the Application Tree View.

  5. Add controls to the tab pages as if they were individual forms.

32.3 Tab Control System Functions

These system functions are specifically applicable to tab controls. They are located in the Control folder.


Disable Tab Page

Use this control to render all controls on a tab page unavailable for entry both by the end user and programmatically. A disabled control is still visible.

Parameters

Tab Control

Input, required. The tab form control (FC) to affect.

Tab Page

Input, required. The tab page to disable. Set the parameter to a tab page from the list of objects.Enable Tab Page


Enable Tab Page

Use this system function to render all controls on a tab page available for entry both by the end user and programmatically.

Parameters

Tab Control

Input, required. The tab FC to affect.

Tab Page

Input, required. The tab page to enable. Set the parameter to a tab page from the list of objects.Disable Tab Page


Hide Tab Page

Use this system function to prevent the user from seeing (and therefore interacting with) the controls on a tab page. Hidden controls can be manipulated programmatically.

Parameters

Tab Control

Input, required. The tab FC to affect.

Tab Page

Input, required. The tab page to hide. Set the parameter to a tab page from the list of objects.

Additional Notes

This function can only be called on Post Dialog is Initialized. At all other times, use Disable Tab Page instead.Disable Tab Page


Set Current Tab Page

Use this system function to programmatically "click" a tab page, thereby bringing it to the forefront and making it active.

Parameters

Tab Control

Input, required. The tab FC to affect.

Tab Page

Input, required. The tab page to display. Set the parameter to a tab page from the list of objects.


Set Tab Page Text

Use this system function to change the title of a tab page in a given instance.

Parameters

Tab Control

Input, required. The tab FC to affect.

Tab Page

Input, required. The tab page for which to change the title. Set the parameter to a tab page from the list of objects.

Text

Input, required. The text to show as the label for the control. Set the parameter to an alphanumeric constant (<Literal>), <Blank>, <Zero>, or an applicable object from the object list.