"namedRegisterIcon"

Sets the given icon onto the header of the given tab.

Synopsis

setValue(string shape, "namedRegisterIcon", (string name, string pictureName);

shape.namedRegisterIcon(string name, string pictureName);

Parameters

Parameter Description
shape Name of the object
name Name of the tab
pictureName

Icon name. This parameter is a relative path to the /pictures directory of the WinCC OA project. If the parameter is set without a file extension, then *.png, *.xpm or *.bmp are searched. If the entered icon will not be found, a "question mark" icon is set (see figure in example below).

If an empty string is passed as parameter, the icon will be removed from the header of the tab.

Description

Sets the given icon onto the header of the given tab.

By setting an icon the size of the tab header can change and thus also the space for the panel inside of the tab. This depends on the used style and font.

Example

main()
{
  TAB1.registerIcon(1, "dpeMon_gr.gif");
  //Sets the "dpeMon_gr.gif" icon onto the second tab header far left
  TAB1.namedRegisterIcon("Trend", "trend_enabled_32.gif");
  //Sets the "trend_enabled_32.gif" icon onto the tab header with the "Trend" title
  TAB1.namedRegisterIcon("Alarms", "ungueltigeDatei");
  //Sets an invalid icon onto the tab header with the "Alarms" title
}
Abbildung 1. Tabs with set icons

Assignment

Tab