<<

Contents

Search

>>

 

ADD_TOOLBAR_ICON

 

 

Function

 

 

Syntax:

ADD_TOOLBAR_ICON(<Handle of  Toolbar>,<Parameter>)

 

<Handle of Toolbar>

= <NUM-EXPRESSION>

<Parameter>

= <STRING-EXPRESSION>

 

 

 

Meaning:

ADD_TOOLBAR_ICON creates an additional icon in the Toolbar <Handle of Toolbar>.

 

ADD_TOOLBAR_ICON returns the following values:

 

Result

Meaning

1

The function has been executed successfully.

-1

A runtime error has occured.

-2

The Toolbar <Handle of Toolbar> does not exist.

 

 

Parameter:

Handle of Toolbar

Handle of Toolbar

 

Parameter

Specifies the images to be displayed. An empty entry creates an additional distance to the next image.

 

<Parameter> has the following structure:

 

 [#][@]<IMAGE NAME>[,<IMAGE NAME OVER>[,<IMAGE NAME SELECTED> [,<IMAGE NAME OVER SELECTED>[,<NOAUTOTOGGLE>]]]]  |  <HELPTEXT> | <ID>

 

Attention: The character | acts as separator. Therefore <HELPTEXT> and <ID> must not contain this character.

 

If the first character of the entry is "#", the image is positioned right-justified in the icon bar, otherwise left-justified.

 

<IMAGE NAME> specifies the image to be displayed. <IMAGE NAME> can be specified with or without @.

 

<IMAGE NAME OVER> specifies the image to be displayed when the mouse cursor is over the image. <IMAGE NAME OVER> can be specified with or without @.

 

<IMAGE NAME SELECTED> specifies the image to be displayed when the icon has been selected by pushing. <IMAGE NAME SELECTED> can be specifies with or without @. If an <IMAGE NAME SELECTED> is specified, the icon works like a 2-phase button: It is selected by clicking on it and deselected by clicking on it again.

 

If the parameter <NOAUTOTOGGLE> is missing or <NOAUTOTOGGLE> = 0, clicking another icon of the toolbar does not deselect the icon.

 

If the parameter <NOAUTOTOGGLE> is specified and has a numeric value <> 0, the icon is deselected only by clicking the icon again and not by clicking another icon of the toolbar.

 

When the macro <macroname> is executed EBUS_DATA$ contains the current state of the icon: "1" means selected, "0" means deselected.

 

<IMAGE NAME OVER SELECTED> specifies the image to be displayed when the mouse cursor is over the image and the icon is selected. <IMAGE NAME OVER SELECTED> can be specified with or without @.

 

<HELPTEXT> is the helptext to be displayed when the mouse cursor is over the image.

 

<ID> is an identification string which is stored in the variable EBUS_DATA$ when the icon is clicked with the mouse.

 

  

Sample:

/* Create a toolbar with 2 Icons in the main window with additional space

NR% = ADD_TOOLBAR(0,"@ebussave.gif|Save|Icon-1;;"+

                    "ebusnew.gif|New|Icon-2",MACRO.TOOLBAR)

 

/* add an additional icon

H% = ADD_TOOLBAR_ICON(NR%,"@ebusstop.gif|Stop|Stop")

IF H% < 0

THEN … Error …

ENDIF

 

See also:

ADD_TOOLBAR

REMOVE_TOOLBAR

REMOVE_TOOLBAR_ICON

ENABLE_TOOLBAR_ICON

EBUS_DATA$