CK_Object
|
+----CK_Component
|
+----CK_Primitive
|
+----CK_LineEdit
The CK_LineEdit class is a CK_Label with edit capability. When a line edit component is clicked on with the left mouse button, it receives the keyboard focus. The cursor will blink and characters typed will appear in the line edit component. The delete key will erase the last character typed. Pressing the right mouse button on the component ends the keyboard focus.
Currently, the editing capability is somewhat limited. Cursor keys are not sensitive, and text cannot be selected for the purpose of copying or deleting. Additional editing functionality is intended to be added in future releases.
A line edit component has all of the behaviour of a CK_Label, as well as the additional properties:
Additional Properties
Example of creating a line edit:
extern CK_Bitmap *caret;
extern CK_Font *font;
extern CK_BBoard *bb;
// The parent is a bulletin board, so the CP_RelativeX and CP_RelativeY must be set.
CK_LineEdit *lineEdit = (CK_LineEdit *) CreateComponent(CT_LineEdit, bb,
CP_Width, 200,
CP_Height, 100,
CP_RelativeX, 50,
CP_RelativeY, 50,
CP_Font, font,
CP_VerticalAlign, CV_VertAlignCenter,
CP_HorizontalAlign, CV_HorizAlignCenter,
CP_BlinkDelay, 200,
CP_Caret, caret,
0);