Canvas > Using Canvas Controls and Objects > Tab Control > Tab Control Properties

Tab Control Properties

Property icon The Tab control supports the following properties, which are available via the Properties pane and the Canvas script editor. Click next to any property name in the Properties pane to see a short description for the selected property.

See Accessing Screen Objects for more information about how to view control objects in script in the Canvas application.

Categorizing, Sorting, and Finding Properties

You can click Categorize (Categorize), click Alphabetize (Alphabetical within Category) or click Search (Search) within the properties using the features located immediately above the properties list. The search box is useful to help locate a property when an object contains many properties. For clarity, when you enter a search term, items matching your entry string remain displayed and non-matching items are temporarily hidden. Clear the search box to display the full properties list again.

You can expand and collapse each property category by clicking Down arrow or Up arrow next to the group name or simply clicking anywhere in the category heading.

Tab Control Properties

The following tables describe the property names visible in the Properties pane user interface (UI) and the corresponding script property name.

UI Property Script Property Description
Name Type Style

Name

ControlName

The Name property specifies the unique identifier for this control. Valid characters are A-Z, 0-9, and underscore (_). Spaces are not allowed. Names cannot start with a number. The default value is the object name and the numeric instance. The control's Name is also displayed on the Controls view of the Screen pane.

Type

ControlType

The read-only Type property displays the type for the control: Chart, Grid, Heat Map, Object Container, Tag Chooser, View, etc. … The control's Type is also displayed on the Controls view of the Screen pane.

Style

 

The Style property defines the style sheet applied to an object on a screen. A style sheet consists of a predetermined list of properties and property values configured for a particular control type.

  • Click Down arrow to reveal a drop-down menu of predetermined styles configured for the selected control.
  • Select a desired style and its properties will be applied to the control.
  • Alternately, you can create a new style based on other property values configured for the control.
  • Or you can select <None> to remove subscription to any style.

Styles are created in two ways:

  • In the control's Properties pane. Click Add a new style (Add a new style based on this control) next to the Style property, after you have configured property values in the Properties pane. See Add a new style based on a control for more information.
  • In the Canvas Settings in the Backstage view. The default style for any control is configured in the Backstage view. See Manage style sheets in the Backstage view for more information.

Tip: You can also change a control's Style on the Controls view of the Screen pane.

LocationBack to top

Height

Height

The Height property specifies the height of the control (or screen).

Tip: You can also change the height of a control using the Settings pane (click on the Settings icon (Settings) to the right of the control in design mode) or on the Controls view of the Screen pane.

Horizontal resize mode

HorizontalResizeMode

The Horizontal resize mode property specifies whether and how the control dynamically moves or resizes horizontally when the screen is resized in run mode. Options include:

  • None — No resizing occurs.
  • Shift — The object will shift horizontally.
  • Expand — The object will expand or shrink horizontally the same number of pixels as the screen.
  • Proportional — The object expands or shrinks proportionally to the screen.

The default value is None.

Layer

Layer

The Layer property specifies the layer for this control. Layers are used to show, hide, and edit multiple controls on one layer without affecting controls on another layer.

  • Type the name of the layer into the Layer field.
  • All layers are listed on the Layers pane, where you can show and hide layers for the screen in design mode and run mode.

Tip: You can also edit a control's Layer on the Controls view of the Screen pane.

 

Note: Layer visibility can be controlled at runtime via the AddLayer, HideLayer, and ShowLayer methods on the Screen object.

Vertical resize mode

VerticalResizeMode

The Vertical resize mode property specifies whether and how the control dynamically moves or resizes vertically when the screen is resized in run mode. Options include:

  • None — No resizing occurs.
  • Shift — The object will shift vertically.
  • Expand — The object will expand or shrink vertically the same number of pixels as the screen.
  • Proportional — The object expands or shrinks proportionally to the screen.

The default value is None.

Visible

IsVisible

The Visible check box indicates whether the control is visible in run mode.

Tip: You can also change a control's Visible setting on the Controls view of the Screen pane.

Width

Width

The Width property specifies the width of the control (or screen).

Tip: You can also change the width of a control using the Settings pane (click on the Settings icon (Settings) to the right of the control in design mode) or on the Controls view of the Screen pane.

X

X

The X property specifies the location of the control along the horizontal axis. Use the up, down, left, and right arrow keys to nudge a control by 1 pixel. Arrow moves a control by 1 pixel. Ctrl+Arrow moves a control by 10 pixels. Ctrl+Shift+Arrow moves a control by 100 pixels.

Tip: You can also change the location of the control using the Settings pane; click on the Settings icon (Settings) to the right of the control in design mode.

Y

Y

The Y property specifies the location of the control along the vertical axis. Use the up, down, left, and right arrow keys to nudge a control by 1 pixel. Arrow moves a control by 1 pixel. Ctrl+Arrow moves a control by 10 pixels. Ctrl+Shift+Arrow moves a control by 100 pixels.

Tip: You can also change the location of the control using the Settings pane; click on the Settings icon (Settings) to the right of the control in design mode.

Z index

ZIndex

The Z index property is used to determine the order in which controls are layered on top of each other. Controls with higher values will draw on top of those with lower values. The newest control added to a screen will always have the highest value and will be the top layer. Two or more controls can be on the same index (layer).

Tip: You can also change the Z index of a control using the Settings pane (click on the Settings icon (Settings) to the right of the control in design mode) or on the Controls view of the Screen pane.

ScriptBack to top

Include in script

 

The Include in script check box indicates that the control will appear in the objects collection of the screen (if scripting is enabled). To optimize performance, best practice dictates that you only include the controls you need to manipulate via script. Other controls should be excluded. When you add an event to a control, it will be automatically added to script and the Include in script property (and the In Script check box on the Controls view) will be set to True.

Tip: You can also change the Include in Script setting on the Controls view of the Screen pane.

Tab ControlBack to top

Enabled

IsEnabled

The Enabled check box indicates whether the control is enabled. The default value is True.

Selected index

SelectedIndex

The Selected index property specifies a zero-based index for the selected tab. -1 indicates no tab is selected and no nested view will display in run mode. 0 indicates the first tab is selected; 1 indicates the second tab is selected; 2 indicates the third tab is selected; and so on.

Tabs

Tabs — the tab control tab

SelectedTab — the currently selected tab

SelectedTab.IsCanvasFile

SelectedTab.IsStudioFile

SelectedTab.IsValidFile

SelectedTab.Label

SelectedTab.ScreenFileSource

SelectedTab.ScreenPath

Screen — the displayed screen

(Use SelectedTab.ScreenPath and SelectedTab.ScreenFileSource to modify the screen via script.)

 

 

The Tab Configuration dialog box displays the tabs that will appear at the top of the tab control, and each tab's properties: the tab name and the path to the screen that will show in the optional nested view.

Click Open dialog box to open Tab Configuration dialog box.

If the number of tabs exceeds the width of the tab control container, arrows are added at the left and right side to allow you to navigate to the tabs you can't see.

Arrows to access invisible tabs

Arrows to access invisible tabs

Tabs: Tab name

 

The Tab name property specifies the label for the tab in the tab control.

Tabs: Screen path

 

The Screen path property specifies the screen that will open in the body of the tab control. Click Open dialog box to select a screen from the Open Files dialog box, where you can access a CygNet APPS or BSS folder or a local or network Windows file-system folder. If no screen is specified, the nested view does not display in run mode.

Note: This control only supports Canvas screens in CygNet v9.4. It does not support the display of CygNet Studio screens (.csf).

GenericBack to top

String

String

The String property specifies a generic string property that can be used when scripting this control. Type a string and reference it in your script as necessary.

Yes/No

YesNo

The Yes/No property specifies a generic Boolean yes/no property that can be used when scripting this control. Click the check box to enable the property and reference it in your script as necessary.


Let us know how we can improve this topic.

CygNet at weatherford.com

© 2020 Weatherford. All rights reserved.