The XREGISTERED function returns the number of instances of the widget named as its argument that are currently registered with the XMANAGER. The registered widget is brought to the front of the desktop unless the NOSHOW keyword is set.
If the specified widget is not currently registered with XMANAGER, XREGISTERED returns zero.
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.
Result = XREGISTERED(Name [, /NOSHOW] )
A string containing the name of the widget in question.
| Note |
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.
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') NE 0 ) THEN RETURN
Introduced: Pre 4.0