3D PLM Enterprise Architecture

User Interface - Dialogs

CATDlgLabel

Adds a text or an image
Quick Reference

CATDialog
  |
  +---CATDlgControl
        |
        +---CATDlgLabel

The Label
CATDlgLabel1.gif (14684 bytes) The label is dedicated to add an information text or an image to controls and to other objects as well. The text can be parameterized with data coming from the application. Some controls, such as a push button, a radio button, or a check button, and frames, have a text companion you can set using its Title resource. On the opposite, a combo or a spinner doesn't display its title. You can then use labels to inform the end user of what the combo or spinner is intended to do, or which variable it can set. The labels in the figure beside are associted with a combo (Form Name), and editors. The other texts are either frame titles, push button titles, or a bitmap combo line mixing a bitmap and the text "User".

Use labels whenever you want to qualify a control or add information to explain its purpose.


Styles
Name Description
CATDlgLabel.jpg (6154 bytes) CATDlgLabLeft The label text is left justified
CATDlgLabRight The label text is right justified
CATDlgLabCenter The label text is centered
CATDlgLabFramed The label text is framed

[Top]


Programmer's Guide

The label doesn't send any notification.

[Top]

Constructing a Label

You just need to choose the label style. A left, center, or right justified label can be framed or not.

_pLeftLabel = new CATDlgLabel (iParent, "Left", CATDlgLabLeft);
_pRightAndFramedLabel = new CATDlgLabel (iParent, "RightAndFramed",
                                         CATDlgLabRight|CATDlgFramed);

[Top]

Setting a Title or an Image to a Label

The label title should be set by the resource file using a key built with the identifier you declare as the second parameter of the label constructor. If the label has altogether a title and an icon declared in its resource files, the icon is displayed alone. The icon shown in the Label Frame above is associated  with a label as follows:

[Top]


History

Version: 1 [Jan 2000] Document created
[Top]

Copyright © 2000, Dassault Systèmes. All rights reserved.