A CTextBox
object is a text component that allows for the editing of a single line of text.
More...
#include <CTextBox.h>
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,. |
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.
CTextBox::CTextBox | ( | const CHAR * | text | ) |
Constructs a new CTextBox
initialized with the specified text.
text | - the text to be displayed A null value is treated as an empty string, "" |
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.
g | - the specified Graphics context |
Reimplemented from CComponent.
void CTextBox::ProcessComponentKeyEvent | ( | SKeyEvent * | e | ) | [protected, virtual] |
Processes events occurring on this component,.
e | - the event |
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
.
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.
editable | - a flag indicating whether this text component is user editable. |
Echo char for password mode.
If char is not zero, it using to hide text.