| Prev | Next | Start of Chapter | End of Chapter | Contents | Glossary | Index | Comments | (8 out of 18)

Defining Text Components

You can use the Icon Editor to define a single text string as a component of a layer, and to combine such layers into a single layer with multiple text components.

The background of a text component is transparent. The text of a text component has the color of the component's layer, and occludes components in lower layers, just as a graphical component does.

The Layer Indicators include a Text Indicator for including a text component in a layer. When a layer has multiple text components, only the first shows in the Text Indicator. All text components appear in the icon description in the class definition's table.

To specify a text component in an icon layer using the Icon Editor:

  1. Make the layer the current layer.

  2. Edit the value of the layer's Text Indicator. The grammar is:

    where:

If the text is larger than the icon that displays it, G2 clips it to fit the available area, both in the Icon Viewer and on a workspace. If necessary, G2 also truncates the text displayed in the Text Indicator. Neither clipping nor truncation affect the text itself as defined in the icon description.

To put more than one text component into a layer, specify each in a separate layer, then combine the layers using the Group button, as described under Creating Groups. Only the first text component in the combined layer appears in the layer's Text Indicator. Use Ungroup to regain separate access to the components of the combined layer.

| Prev | Next | Start of Chapter | End of Chapter | Contents | Glossary | Index | Comments | (8 out of 18)

Copyright © 1997 Gensym Corporation, Inc.