Maptitude GISDK Help

Tab Lists

 

A tab list is similar to a set of notebook dividers: it groups the controls within a dialog box into separate pages, only one of which is visible at any time. The tab items allow a user to move from page to page to locate a particular topic or section easily.

 

The format of a tab list definition is:

 

Tab List {"item name"} hpos, vpos {, width {, height}} {options}

Tab {" item name "} {options} {do

     <statements go here>

     endItem}

<dialog box items for this tab go here>

<more tab items go here>

 

Tab List Option

Description

Variable: variable

An integer indicating which tab is selected. The first tab is number one. An initial value can be set to specify a tab to be made current when the dialog box is opened. If the value is null initially then the first tab is selected by default. If no variable is specified then no tabs except for the first will be able to be selected.

 

Tab Option

Description

Prompt: expression

The text displayed in the tab

 

The tab list item appears as a raised panel, with the tabs arranged in one or more rows along the top edge of the tab list. The tabs themselves are sized relative to the length of the text prompt that is specified for each one. You can get a second row by making the widths of the tab texts greater than the width of the whole dialog box.

 

There can be only one tab list item in a dialog box and it must be defined before any tab items.

 

Dialog box items that are defined before the first tab item are global to the dialog box. They are visible no matter which tab is selected.

 

All dialog box items such as buttons, scroll lists, etc., defined between one tab item and the next (or the last tab item and the end of the dialog box definition), are local to the preceding tab and displayed only when that tab item is current. The hpos and ypos values in the position information for these items are relative to the content area of the tab list item, rather than to the dialog box as a whole. The hpos value is relative to the left edge of the tab list. The vpos value is relative to the bottom edge of the bottom row of tabs in the tab list.

 

Macro items are always global to the dialog box, even if they are defined after any of the tab items.

 

The tab list as a whole can be disabled (and re-enabled) using DisableItem() and EnableItem(), but the tabs themselves cannot be disabled. You can use ShowItem() and HideItem() functions to show and hide tab lists and tab items, and you can call HideItem() in the Init item of the dialog box.

 

The individual tab items can have a do...endItem section, but the tab list item cannot. The statements in a tab item's do...endItem section, if specified, are executed when the user clicks on that specific tab.

 

Here is an example:

 

DBox "Tabs Example"

 

     init do

          tab_idx = 1

          opt = 0

          choices = {"True", "False"}

          ch_idx = 1

          endItem

 

     //This button always visible

     Button "Close" 8, 7, 10 do

          Return()

          endItem

 

     Tab List 0.5, 0.5, 26, 6 variable:tab_idx

 

     //First tab

     Tab prompt:"Tab 1"

 

     Checkbox 3, 1.5 Prompt:"Option" variable:opt

 

     //Second tab

     Tab prompt:"Tab 2"

 

     Popdown Menu 8, 1.5, 8 Prompt:"Choose" list:choices variable:ch_idx

 

endDBox

 

 

©2025 Caliper Corporation www.caliper.com