Skip to content

INSERT_ICON ​

INSERT_ICON inserts a new (custom) smart icon into a component's quick access bar.

Syntax ​

leo-grammar
CC "Application"
INSERT_ICON	component:Component IconOrSep [ pos:intValue ] .

IconOrSep :	Icon | separator .

Icon :	name:strValue bitmap:strValue text:strValue .

Component :	"acquisition" | "modeling" | "analysis" 
			"simulation" | "evaluation" | "importexport" | 
			"all" .

#--> RESULT ecode:intValue .
CC "Application"
INSERT_ICON	component:Component IconOrSep [ pos:intValue ] .

IconOrSep :	Icon | separator .

Icon :	name:strValue bitmap:strValue text:strValue .

Component :	"acquisition" | "modeling" | "analysis" 
			"simulation" | "evaluation" | "importexport" | 
			"all" .

#--> RESULT ecode:intValue .

Parameters ​

  • component (strValue) - name of the component as displayed in the list above.
  • pos (intValue) - the position of the icon
  • name (strValue) - name of the icon
  • bitmap (strValue) - path of the imageto be displayed
  • text (strValue) - alternate text for the icon, to be displayed when hovering

Returns ​

  • ecode (intValue) - Contains the error code or is 0 in case of success.

Details ​

The icon image is loaded from the file specified with bitmap. The image may be of any graphics format. However, the recommended format is PNG with alpha channel (allowing semi-transparet pixels).

See Also ​

Examples ​

Insert a new "tip of the day" icon and assign a click handler.

leo-grammar
CC "Application" INSERT_ICON component:"modeling" name:"TIP"
    bitmap:"light.bmp" text:"Tip of the day"
CC "Application" SET_ICON_CLICK_HDL name:"TIP" {
    CC "AdoScript" INFOBOX "Nevermind!"
}
CC "Application" INSERT_ICON component:"modeling" name:"TIP"
    bitmap:"light.bmp" text:"Tip of the day"
CC "Application" SET_ICON_CLICK_HDL name:"TIP" {
    CC "AdoScript" INFOBOX "Nevermind!"
}

Versions and Changes ​

Available since ADOxx 1.3