A display area for a short text string. More...
#include <CLabel.h>
Public Member Functions | |
CLabel (const CHAR *text) | |
Creates a CLabel instance with the specified text. | |
void | SetText (const CHAR *text) |
Sets the text for this label to the specified text. | |
void | SetAligment (INT8 aligment) |
Sets the alignment for this label to the specified alignment. | |
virtual void | Paint (CGraphics *g) |
Paints the component. |
A display area for a short text string.
A label does not react to input events. As a result, it cannot get the keyboard focus.
CLabel::CLabel | ( | const CHAR * | text | ) |
Creates a CLabel
instance with the specified text.
The label is centered vertically and horizontally of its display area.
text | - the text to be displayed by the label. |
void CLabel::Paint | ( | CGraphics * | g | ) | [virtual] |
Paints the component.
This forwards the paint to any components that are children of this component. If this method is reimplemented, Paint(g) of base class should be called so components are properly rendered.
g | - the specified Graphics context |
Reimplemented from CComponent.
void CLabel::SetAligment | ( | INT8 | aligment | ) |
Sets the alignment for this label to the specified alignment.
Possible values are LIBGUI_LEFT
, LIBGUI_RIGHT
, LIBGUI_TOP
, LIBGUI_BOTTOM
, LIBGUI_HCENTER
and LIBGUI_VCENTER
.
alignment | - the alignment to be set. |
void CLabel::SetText | ( | const CHAR * | text | ) |
Sets the text for this label to the specified text.
text | - the text that this label displays. If text is null , it is treated for display purposes like an empty string "" . |