Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Engineering

PARAGRAPH Gadget

  • Last UpdatedNov 07, 2024
  • 3 minute read

Members

Name

Type

Purpose

Val

STRING Get/Set

The paragraph's textual content as a string.

If it has a pixmap then the value will be the pathname of the pixmap file as a string.

Background

REAL

Get/Set

Set or get Background Color Number.

Background

STRING Get/Set

Set Background Color Name.

Methods

Name

Result

Purpose

AddPixmap(STRING)
AddPixmap(STRING, STRING)
AddPixmap(STRING, STRING, STRING)

NO RESULT

Adds pixmaps to be used for the unselected, selected and inactive states.

FullName()

STRING

Get the full gadget name, for example, '!!Form.gadget'.

Name()

STRING

Get the gadget's name, for example, 'gadget'.

Owner()

FORM

Get owning form.

SetPopup (MENU)

NO RESULT

Links the given menu with the gadget as a popup.

RemovePopup(MENU)

NO RESULT

Removes the given pop-up menu from the gadget.

GetPickedPopup()

MENU

Returns the last picked pop-up menu for the gadget.

SetTooltip(STRING)

NO RESULT

Sets the text of the Tooltip.

Shown()

BOOLEAN

Get ‘shown’ status.

Type()

STRING

Get the GADGET type as a string.

Background()

STRING

Get Background Color Name.

Some gadgets do not support this property in all circumstances, for example, gadgets which are showing a pixmap.

Gadgets whose color has not been set explicitly, may not have a color with a known colorname. In this case, an error is raised.

Command

The PARAGRAPH command defines a paragraph and specifies its position, dimensions (in units of character widths and line heights), and, optionally tag text or a pixmap. Note that a paragraph gadget is passive so it ’s callback is never used. A paragraph gadget can have a tag, but it is not displayed.

You can define the PARAGRAPH to be either PML-controlled, or core-code controlled using the gadget qualifier attribute control type, with values "PML" or "CORE".

                       .-------------<---------.

                      /                        |

>-- PARAgraph gname -+-- <fgpos> --------------|

                     +-- BACKGround <colno> ---|

                     +-- <fganch> -------------|

                     +-- DOCK FILL ------------|

                     +-- CORE -----------------* Core managed gadget

                     +- PIXMAP -+- filename -.

                     |          ‘------------‘-<vshap>-->

                     ‘- TEXT text -+-<vshap>-.

                                   ‘---------‘-->

Notes:

  • If a paragraph is to contain text, then its shape will be specified in grid units. The height is the number of lines of text and the width is typically thought of as the number characters required. This may be less that the actual string length, because the grid width is the size of the font notional character width, which is typically smaller than the largest characters in the font. You may need to specify a few extra grid units to guarantee to fit variable strings.

  • If a paragraph contains text, and no dimensions are specified, the result is a single line of width (in grid units) equal to the number of text characters. This may not be long enough to guarantee to fit the specific string, so you may nee to pad out with extra spaces to avoid truncation.

  • If your paragraph is to contain more than one line of text, you must specify a suitable shape. The text, which can contain newline characters, will be justified in the area given.

  • If a pixmap is specified, the shape of the gadget must be defined and will be in pixels. Remember to define the pixmap using the paragraph's AddPixmap() method or its .Val member.

  • If the paragraph is to have its contents modified then the text or pixmap file would normally be specified in the form's default constructor method, rather than in the gadget definition.

  • It is bad practice to place one gadget on top of another. This may lead to gadgets being obscured.

Related Links
TitleResults for “How to create a CRG?”Also Available in