XREGISTERED

The XREGISTERED function returns True if the widget named as its argument is currently registered with the XMANAGER as an exclusive widget. Otherwise the routine returns false.

If the named widget is registered, XREGISTERED returns the number of instances of that name in the list maintained by XMANAGER. The registered widget is brought to the front of the desktop unless the NOSHOW keyword is set.

This routine is written in the IDL language. Its source code can be found in the file xregistered.pro in the lib subdirectory of the IDL distribution.

Calling Sequence

Result = XREGISTERED( Name )

Arguments

Name

A string containing the name of the widget in question.

Keywords

NOSHOW

If the widget in question is registered, it is brought to the front of all the other windows by default. Set this keyword to keep the widget from being brought to the front.

Example

Suppose that you have a widget program that registers itself with the XMANAGER with the command:

XMANAGER, 'mywidget', base

You could limit this widget to one instantiation by adding the following line as the first line (after the procedure definition statement) of the widget creation routine:

IF XREGISTERED('mywidget') THEN RETURN

See Also

XMANAGER