CLabel Class Reference

A display area for a short text string. More...

#include <CLabel.h>

Inheritance diagram for CLabel:
CComponent

List of all members.

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.

Detailed Description

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.


Constructor & Destructor Documentation

CLabel::CLabel ( const CHAR *  text  ) 

Creates a CLabel instance with the specified text.

The label is centered vertically and horizontally of its display area.

Parameters:
text - the text to be displayed by the label.

Member Function Documentation

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.

Parameters:
g - the specified Graphics context
See also:
Redraw

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.

Parameters:
alignment - the alignment to be set.
void CLabel::SetText ( const CHAR *  text  ) 

Sets the text for this label to the specified text.

Parameters:
text - the text that this label displays. If text is null, it is treated for display purposes like an empty string "".

The documentation for this class was generated from the following files:
Generated on Tue Jun 29 18:34:06 2010 for guilib by  doxygen 1.6.3