# Query Control Use CTLOP\_INFO to query the details of a control by its _ctlid_. This is mainly useful in three kinds of situations: • You need to determine if a control (with a specific _ctlid_) still exists (perhaps upon return from a subroutine that may or may not have cleared the screen). • You have a _ctlid—_perhaps returned from [AUI\_EVENTWAIT—](aui_eventwait.md)but your program does not keep track of controls by their _ctlids_, so you need to find out more information about the control to decide what to do. • You have a _ctlid_ and you know what control it is, but the control has changeable text and you want to determine what text is currently associated with the control. This would mainly apply to a control designed to be modified by the user (such as an edit control), and in that case, you would probably use INFLD and keep track of the text a different way, but this capability may be useful in an advanced situation. To query a control, you need to specify the _ctlid_. The contents of all the other parameters are ignored on input, and are returned with updated values based on the control specified. If the control exists, _cstatus_ will be set >= 0. If the control is not found, it will set to –2. Other negative values correspond to errors (see [cstatus](cstatus_aui_control.md) above for a table of error codes). You must specify at least the parameters up to _cstatus_ (and it must be a real variable); all others are optional (but will be updated if passed). **Comments** Beginning with A-Shell 1751 of November 2023: when used on a TABX control, CTLOP\_INFO returns the current panel number (starting from 1) in the _cstatus_ parameter if the control is found. Previously it returned the control id. This affects only the Windows client (or ATE), not the server side. Also, the current panels' command string will be return in the _ctext_ parameter. **Example** ctlid = "btnTest" \! id of control to query xcall AUI, AUI\_CONTROL, CTLOP\_INFO, ctlid, ctext, cstate, ctype, cmd, func, cstatus, srow, scol, erow, ecol if cstatus >= 0 then \! control exists; ctext, cstate, etc. will be updated else \! control does not exist endif **History** 2023 November, A-Shell 1751: When used on a TABX control, CTLOP\_INFO returns the current panel number (starting from 1) in the _ctext_ parameter if the control is found, and the current panel's command string in _ctext_.