CTextBox Class Reference

A CTextBox object is a text component that allows for the editing of a single line of text. More...

#include <CTextBox.h>

Inheritance diagram for CTextBox:
CComponent

List of all members.

Public Member Functions

 CTextBox (const CHAR *text)
 Constructs a new CTextBox initialized with the specified text.
void SetAligment (INT8 aligment)
 Sets the alignment for this text box to the specified alignment.
void SetEditable (BOOL editable)
 Sets the flag that determines whether or not this text component is editable.
virtual void Paint (CGraphics *g)
 Paints the component.

Public Attributes

CHAR m_passwordChar
 Echo char for password mode.

Protected Member Functions

virtual void ProcessComponentKeyEvent (SKeyEvent *e)
 Processes events occurring on this component,.

Detailed Description

A CTextBox object is a text component that allows for the editing of a single line of text.

This object can also use for password box.


Constructor & Destructor Documentation

CTextBox::CTextBox ( const CHAR *  text  ) 

Constructs a new CTextBox initialized with the specified text.

Parameters:
text - the text to be displayed A null value is treated as an empty string, ""

Member Function Documentation

void CTextBox::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 CTextBox::ProcessComponentKeyEvent ( SKeyEvent *  e  )  [protected, virtual]

Processes events occurring on this component,.

Parameters:
e - the event
See also:
DispatchEvent

Reimplemented from CComponent.

void CTextBox::SetAligment ( INT8  aligment  ) 

Sets the alignment for this text box 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 CTextBox::SetEditable ( BOOL  editable  ) 

Sets the flag that determines whether or not this text component is editable.

If the flag is set to true, this text component becomes user editable. If the flag is set to false, the user cannot change the text of this text component. By default, non-editable text components have a background color of SColorScheme.control.

Parameters:
editable - a flag indicating whether this text component is user editable.

Member Data Documentation

Echo char for password mode.

If char is not zero, it using to hide text.


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