pvSetColumnProperties()

Use the CTRL function "pvSetColumnProperties" to set certain column properties for a column in the project view of the GEDI. This function is for use in the projectView.ctl file only (wincc_oa_path/[Version]/scripts/gedi/projectView.ctl).

Synopsis

int pvSetColumnProperties(int column, mapping props);

Parameters

Parameter Description
column The column number is returned by the function pvAddColumn().
props

Options for the column that is added:

"width" (int) ... define the column width.

"resizeMode" (string) ... The mode can be one of the following strings:

  • "Interactive" ... The user can resize the column

  • "Fixed" ... The user cannot resize the column

  • "Stretch" ... The ProjectView will automatically resize the section to fill the available space. The size cannot be changed by the user .

  • "ResizeToContents" ... The ProjectView will automatically resize the column to its optimal size based on the contents of the entire column. The size cannot be changed by the user.

"visible" (bool): defines if the column shall be visible (default: true).

"tooltip" (string): a tooltip which is shown when hovering over the columns header.

Return value

The function returns 0 if it was executed successfully.

Error

Missing or wrong arguments.

Description

Use the CTRL function "pvSetColumnProperties" to set certain column properties for a column in the project view of the GEDI.

EXAMPLE

The following example shows how to change the column properties of the second column in the project view of the GEDI.

  1. #uses "CtrlPv2Admin"
    main()
    {
       pvSetColumnProperties(2, makeMapping("resizeMode", "ResizeToContents", "tooltip","First test for the plant1"));
      /*Sets the resize mode of the column to "ResizeToContents" meaning that
      the ProjectView will automatically resize the column to its optimal size
      based on the contents. The example also sets the tooltip to "First test for the
      plant1" */
    }

Figure: Project View and Changed Column Properties

Availability

CTRL