Resource Editor for a Widget Instance

When you select a widget instance, the Resource Editor displays the text fields and resources described in the following sections.

Resource Editor Text Fields for a Widget Instance

When updated for a widget instance in Instances View, the Resource Editor displays the following text fields:

Instance Name

Displays the widget instance name, as it appears on the Browser.

Class Name

Displays the Widget Class to which the widget instance belongs.

Style

Displays the name of the resource style applied to the widget instance. If no resource style has been applied to the widget, this field is empty. See Style and refer to Style Editor for more detailed information about style resources.

Resource Settings for a Widget Instance

The option menu to the far right of each resource text field enables you to change the resource setting for each resource. The following table lists and describes the available resource settings:

Resources

Description

None

The resource for this widget is set to the default value of that widget class. When a widget instance is first created, all of its resources have a resource setting of None.

Code

The value is hardcoded, and the user cannot change the value.

App

This setting is not available for Java.

The resource has been set as an app-default. When the app-defaults file is written, it includes all resources whose app-defaults value is set as App. The user can change an app-default resource value by editing the app-defaults resource file or by overriding it from a local resource file or from the command line (with the toolkit option "-xrm"). Typically, the app-defaults file is shipped with your finished application so that the application user can run your application without having specified anything on the command line.

Const

The value is set to a constant, selected by clicking the arrow button to the right of Const and selecting a constant from the pull-down menu. The menu contains all constants defined for the interface. Selecting "New" displays the Constant Editor with a new constant.

"New" is not available for pixmap constants.

Ident

The value is set to an identifier, selected by clicking the arrow button to the right of Ident and selecting an identifier from the pull-down menu. The menu contains all identifiers defined for the interface. Selecting "New" displays the Identifier Editor with a new constant.

Expr

The resource takes an expression as its value. The value is hard-coded and cannot be overridden by the application defaults. See Expressions .

Style

The resource is one of a set of resources in the style that has been applied to the widget.

Expose

For some resources in Java and in ViewKit, the expose option is insensitive.

You can view and modify a widget instance's resource when the Resource Editor is updated for the class instance in Instances View. Use this resource in conjunction with any other setting except None and Style.

The Expose setting is available only to widget instances which are members of a class.

Widget Instance Resources

If the selected widget is a Motif or ViewKit object, the Resource Editor displays the Widget Instance resources and callbacks.

Constraint resources for Motif and ViewKit objects

Children of some container widgets add constraint resources at the end of the resources list (the word "Constraint" precedes these resource names). For example, if you place a Button in a Form container, additional resources are displayed which allow you to control the layout of the Button within the Form. However, if you place a Button in a BulletinBoard container, no resources are added to the Resource Editor.

Constraint resources for Java objects

If the selected widget is a Java object, the Resource Editor displays a list of attributes and events associated with the selected object. Relevant layout attributes are also displayed.

For example, when you set the object's layout to GridBagLayout, the Resource Editor also displays resources associated with the GridBag constraint object. The GridBag constraint object is part of the code generated by Builder Xcessory, but is not displayed on the Palette. The layout resource appears with the container if the attribute controls the overall layout and with the child if the attribute controls the placement of a particular child.

Code generated Java objects

In some cases, non-visual objects are required to set resources. The following objects are not on the Palette, but are created when Builder Xcessory generates code:

· BorderLayout

· FlowLayout

· CardLayout

· GridLayout

· GridBagLayout

· GridBagConstraints

· CheckBoxGroup

These objects supply additional resources in the Resource Editor for the associated object.

 

Documentation: