message class : message(bool,int) fitter

Description

Returns a new instance of message class.

Syntax

new message(bool clip, int icon)

Arguments

ClassNameDescription
boolclipA value that indicates whether to copy the message to the clipboard.
inticonA value that indicates the type of icon.

Return value

ClassDescription
messageA new instance of message class.

Sample code

1:

message instance = new message(true, 3); // It clips message and has a warning icon.

2:

message instance2 = new message(false, 1); // It does not clip message and has a error icon.

Notes

First argument.

Specifies true, the displayed message is saved in the clipboard. Specifies false, nothing happens.

Instances of the message class save messages to the clipboard by default.


Second argument.

Specifies the icon by numerical value.


The following is the correspondence between icons and numerical values.

0 : None : Not appear.

1 : Error : X in a circle with a red background.

2 : Question : Question in a circle.

3 : Warning : Exclamation in a triangle with a yellow background.

4 : Information : i in a circle.

The default value is 0.

Links for reference

None.

Copyright © Cooker All rights reserved.