CW_ITSTATUSBAR

Syntax | Return Value | Arguments | Keywords | Widget Events Returned by the CW_ITSTATUSBAR Widget | Version History | See Also

The CW_ITSTATUSBAR function creates an iTool status bar compound widget that will contain any status bars registered with the specified IDLitUI object's associated iTool. See Status Messages for additional details on status bars.

Warning
This routine can only be used in the context of a user-created iTool. See Overview of iTools Compound Widgets for details.

The CW_ITSTATUSBAR widget automatically performs the following actions:

  1. Creates a base widget to contain the status bars.
  2. Constructs any status bars registered with the iTool using label widgets. See IDLitTool::RegisterStatusBarSegment for details.
  3. Adds itself as an observer of each status bar segment object. The CW_ITSTATUSBAR widget listens for the following message:

    Table B-3: Messages Understood by CW_ITSTATUSBAR

    Message
    Value
    Description / Result

    MESSAGE

    String

    Change the text of the status bar segment.

  4. See iTool Messaging System for a discussion of observers and notifications.

    Tip
    By default, iTools include two status bar segments. The StatusMessage and ProbeStatusMessage methods of the IDLitIMessaging class can be used to automatically send the MESSAGE callback to the appropriate status bar segment. See Status Messages for details.

Resizing CW_ITSTATUSBAR Widgets

The CW_ITSTATUSBAR widget does not automatically resize itself to the size of its parent widget. To resize the CW_ITSTATUSBAR widget, your event handling code must call the CW_ITSTATUSBAR_RESIZE procedure to specify the new size. The CW_ITSTATUSBAR_RESIZE procedure has the following interface:

CW_ITSTATUSBAR_RESIZE, Widget_ID, Xsize 

where Widget_ID is the CW_ITSTATUSBAR widget ID, and Xsize is the new width of the status bar.

Syntax

Result = CW_ITSTATUSBAR(Parent, UI [, UNAME=string] [, UVALUE=value] [, XSIZE=integer] )

Return Value

This function returns the widget ID of the newly-created status bar base widget.

Arguments

Parent

The widget ID of the parent base widget.

UI

An object reference of the IDLitUI object associated with the iTool. See User Interface Object for information on creating user interface objects.

Keywords

UNAME

Set this keyword to a string that can be used to identify the widget in your code. You can associate a name with each widget in a specific hierarchy, and then use that name to query the widget hierarchy and get the correct widget ID.

To query the widget hierarchy, use the WIDGET_INFO function with the FIND_BY_UNAME keyword. The UNAME should be unique to the widget hierarchy because the FIND_BY_UNAME keyword returns the ID of the first widget with the specified name.

UVALUE

The "user value" to be assigned to the widget. Each widget can contain a user-specified value of any data type and organization. This value is not used by the widget in any way, but exists entirely for the convenience of the IDL programmer. This keyword allows you to set this value when the widget is first created. If UVALUE is not present, the widget's initial user value is undefined.

The user value for a widget can be accessed and modified at any time by using the GET_UVALUE and SET_UVALUE keywords to the WIDGET_CONTROL procedure.

XSIZE

Set this keyword to an integer specifying the initial width of the status bar. See Resizing CW_ITSTATUSBAR Widgets for additional details. The default XSIZE is 640 pixels.

Keywords to WIDGET_CONTROL and WIDGET_INFO

The widget ID returned by most compound widgets is actually the ID of the compound widget's base widget. This means that many keywords to the WIDGET_CONTROL and WIDGET_INFO routines that affect or return information on base widgets can be used with compound widgets.

See Creating a Compound Widget (User Interface Programming) for a more complete discussion of controlling compound widgets using WIDGET_CONTROL and WIDGET_INFO.

Widget Events Returned by the CW_ITSTATUSBAR Widget

CW_IT* compound widgets do not return widget events. All interaction with the iTool user interface is accomplished via the iTool messaging system and the callback mechanism implemented in the user interface creation routine.

Version History

Introduced: 6.1

See Also

Creating a Custom iTool Widget Interface, CW_ITMENU, CW_ITPANEL, CW_ITTOOLBAR, CW_ITWINDOW