Using a Tab Control in a Display

Background

The tabbing of pages within a tab control relies on the field number of a frame. The page displayed when tab one is selected is in fact a frame with the field number 100. The second tab has a tab page/frame with the field number 200, and so on.

Zim forms can have multiple frames with the same field number enabling the developer to create complex tab controls. For example, when the first tab is selected two tab/pages frames (that are not overlapping) could be displayed simultaneously, if they both had a field number of 100.

Displays

A Tab Control can be easily modified for manipulation in a display. To display forms using tab selection, all widgets for that particular form must be in a frame assigned with the appropriate field number. For example, a tab control displays three different forms - Customers, Suppliers, and Products. The form fCustomer contains a frame, of which all Customer widgets are children. This frame has a field number of 100. The fSupplier form has a frame, of which all Supplier widgets are children. This frame has a field number 200.

Points to Remember

Repeating Forms

Repeated forms can also be used in a tab control. Remember to make the widgets children of a tab page/frame. Assign the frame with the appropriate field number.