Dials & Gauges Blockset    

Displaying Text on a Block

Many blocks allow you to include text on the block. Such text might describe the quantity being measured, the units of measurement, or other information. The table below lists some types of text that are associated with a specific part of the block, as well as the part of the ActiveX Control Properties dialog box panel that defines the text. Some types of text apply only to certain blocks.

Type of Text
Part of Dialog Box That Defines or Enables Text
Title appearing in block's outline
Title property on Background panel
Numerical labels near tick marks
Labels area on Ticks panel. On Strip Chart block, Labels properties on Tracks and X Axis panels.
Numerical labels near pointer, needle, or knob
Digital panel
Captions appearing anywhere on block
Captions panel

Using the Captions Panel to Display Text

When it is present, the Captions panel of the ActiveX Control Properties dialog box allows you to place text anywhere on the block. Blocks that use text captions by default include Mixer Scale, Tank, Thermometer, Amp Meter, and Volume. This section describes how to add, remove, and change characteristics of text captions using the Captions panel.

Adding Text Captions.   To create a new text caption, follow these steps:

  1. Increase the value of the Captions property by one.
  2. Set CaptionID to its maximum value. This is the index that corresponds to the newest text caption.
  3. Type the desired text in the Caption edit field.

Removing Text Captions.   To remove the most recently added text caption (that is, the one with the largest CaptionID value), decrease the value of the Captions property by one. Note that this removes all characteristics of that text caption.

Changing Fonts and Other Characteristics of Text Captions.   To change the font of an existing text caption, you must create a numbered font style and then apply that style to the caption. Follow these steps:

  1. Open the Fonts panel of the dialog box.
  2. Allocate space for a new font style by increasing the value of the Fonts property by one.
  3. Set FontID to its maximum value. This is the index that corresponds to the newest font style.
  4. Use the Set Font button to select font characteristics.
  5. Open the Captions panel of the dialog box.
  6. Set CaptionID to the index that corresponds to the text caption whose font you want to change.
  7. Apply the font style to the caption by setting FontID to the font style's index.

To change other characteristics of an existing text caption, first set the CaptionID property on the Captions panel to the value that corresponds to the text caption you want to change. Then use other properties on the dialog box panel, except the Captions counter, to configure the text caption accordingly.


  Understanding ID Properties Controlling Values with the Mouse