Home | Categories | Alphabetical | Classes | All Contents | [ < ] | [ > ]

XREGISTERED


Syntax | Arguments | Keywords | Examples | Version History | See Also

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.

Syntax

Result = XREGISTERED(Name [, /NOSHOW] )

Arguments

Name

A string containing the name of the widget in question.

Note
XREGISTERED checks for Name in a COMMON block created by XMANAGER. The stored name is case-sensitive.

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.

Examples

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 

Version History

Introduced: Pre 4.0

See Also

XMANAGER


Home | Categories | Alphabetical | Classes | All Contents | [ < ] | [ > ]