OSTaskbarManager.SetBadge

Syntax variant: ByPicture

Syntax:

SetBadge(<Picture>, <HideOnSelection>)

Parameters:

<Picture> (required)

Type: Picture.
An icon which will be displayed in the lower right hand corner of the program button on the taskbar.
Picture format – any but file in the ".ico" format is recommended, image size is 16x16 pixels (it is recommended to have pictures for image sizes 20x20 and 24x24 pixels).

<HideOnSelection> (optional)

Type: Boolean.
If the value is set True, the icon will be removed by clicking the program button on the taskbar.
Default value: False.

Description of method variant:

Sets an icon from the picture.
It is recommended to use icon of size 16x16 px in ICO format, also we recommend to possess icons of sized 20x20px and 24x24 px.

Syntax variant: ByNumber

Syntax:

SetBadge(<Number>, <HideOnSelection>)

Parameters:

<Number> (required)

Type: Number.
A number (from 0 to 99) which will be displayed in the lower right hand corner of the program button on the taskbar.

<HideOnSelection> (optional)

Type: Boolean.
If the value is set True, the icon will be removed by clicking the program button on the taskbar.
In Unity OS the parameter is ignored.
Default value: False.

Description of method variant:

Sets a numeric icon.
Note: only for launched application. If negative value is passed, the error message is shown. If the passed value is larger than 99, then 99 is used instead.
In Unity OS it shows a value from 0 to 9999 on the Unity Launcher icon.

Description:

Specifies notification icon on top of the program button on the taskbar.
Runs under Windows 7 OS or higher, Ubuntu Unity. Does not perform any actions under other operating systems.

Availability:

Thin client, thick client.

Note:

An option to use a picture as notification icon only works in Windows 7 and higher.
Icons on the application buttons on the Windows taskbar are only displayed if option "Use small icons" is cleared, and "Large icons" in the properties of the Start menu is checked.
The number which is specified as notification icon in Windows 7 or higher should belong to the range [0, 99], in Ubuntu Unity - [0, 9999]; otherwise, it will be replaced by a relevant boundary value.
In Ubuntu Unity OS parameter &HideWhenSelecting is ignored.

Example:

OSTaskbar.SetIcon(PictureLib.Icon1, True);
OSTaskbar.SetIcon(77);


    

1C:Enterprise Developer's Community