3D PLM Enterprise Architecture |
User Interface - Dialogs |
CATDlgLabelAdds a text or an image |
Quick Reference |
CATDialog | +---CATDlgControl | +---CATDlgLabel
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.
Name | Description | |
---|---|---|
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]
The label doesn't send any notification.
[Top]
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]
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:
_pIconLabel = new CATDlgLabel (iParent, "IconLabelId", CATDlgLabLeft); |
FrameId.IconLabelId.Title = "Icon Label"; |
FrameId.IconLabelId.Icon = "PaperPortrait"; |
The PaperPortrait.bmp file should be available in the CNext\resources\graphic\icons\normal directory. Otherwise, the title is displayed.
[Top]
Version: 1 [Jan 2000] | Document created |
[Top] |
Copyright © 2000, Dassault Systèmes. All rights reserved.