EDITBOX¶
C#: CWinCtrlEditbox
It is a text editable control.
You can set the maximum rows and the maximum string size.
This control is scrollable control.
if you set SCROLL_LOCK to STYLE property, the window system calls onDrag when you drag these controls.And you can get a dragged direction of these controls.Even if you set DRAG to STYLE property, these controls do not affect anything.
EDITBOX(Control name)
Property 1;
Property 2;
:
:
Property n
};
Example¶
Examples of line input edit box
EDITBOX(LoginID) { ID = 001_000_00010; STYLE = ANCHOR_BOTTOM; SIZE = 300; EDIT = 255,0; //255 characters,one line POSITION = 0,$y; FONT_KIND = "fn24"; };Examples of multi-line input edit box(10 lines in this example).
EDITBOX(Sentence) { ID = 000_000_00010; STYLE = ANCHOR_LEFT; CAPTION_COLOR = COLOR32(50,50,50,255); FONT_KIND="fn16"; EDIT = 255,10; //255 characters,10 lines TEX_ID = 0,"EDBT0"; POSITION = $x,$y; SIZE = $w,$h; };
Editing features¶
This control have simple editing features on other than Android and iOS environment.
The editing shortcut keys are different from the UnityEditor and your application by the UnityEditor limitaion.
Cursor movement
On you application
On UnityEditor
Move the cursor to the right
Right
Right
Move the cursor to the left
Left
Left
Move the cursor to the up
Up
Up
Move the cursor to the down
Down
Down
Move the cursor to the top
Home
Home
Move the cursor to the end
End
End
Selected range.
On you application
On UnityEditor
Extend the selection to the right.
Shift + Right
Shift + Right
Extend the selection to the left.
Shift + Left
Shift + Left
Extend the selection to the up.
Shift + Up
Shift + Up
Extend the selection to the down.
Shift + Down
Shift + Down
Extend the selection to the top.
Shift + Home
Shift + Home
Extend the selection to the end.
Shift + End
Shift + End
Editing features
On you application
On UnityEditor
Back space
BackSpace
BackSpace
Delete
Delete
Delete
Cut
Ctrl + X
Ctrl + Shift + X
Paste
Ctrl + V
Ctrl + Shift + V
Cpopy
Ctrl + C
Ctrl + Shift + Z
Property¶
Default value¶
TEX_ID = "TXFD?"; TEX_ID1 = "CURSR"; //Cursor parts id COLOR = 1,1,1,1; COLOR1 = 1,1,1,1; //Cursor color CAPTION_COLOR = 1,1,1,1;
Part ID rule¶
It replaces the fifth character of the part ID to 0/1.
XXXX0: off state
XXXX1: on state
TEX_ID = "TXFD?";If parts ID has been set in this way, you need to prepare parts, such as the following.
TXFD0: Focus is in the state of OFF
TXFD1: Focus is in the state of ON
ID = Control ID¶
Define the control ID.
ID = 001_000_00010;Note
If you don’t set the ID, it generates automatically from the hash value.
EDIT = input character maximum number, input possible number of lines¶
Set the input character maximum number and input possible number of lines.
if a edit box is input possible number of lines that is 0 or 1, it is the line input edit box.
POSITION = X, Y¶
Determine the display position. The base position changes according to the anchor in STYLE.
POSITION = 32,{50} + 64;Coordinates can be specified as a percentage .
SIZE = width,height¶
It changes the display size. If it is omitted , or , you specify 0 ,it gets the size from the texture parts.
SIZE = 64,32; //64x32 SIZE = ,32; //Set the width of the texture part width SIZE = 64; //Set the height of the texture part height SIZE = {50} - 25;Size can be specified as a percentage .
TEX_ID = Texture ID,Part ID¶
TEX_ID = Part ID¶
You set the texture ID and the part ID.
TEX_ID1 = Texture ID, part ID¶
TEX_ID1 = part ID¶
You set the texture ID and the part ID.
COLOR = R,G,B,A¶
Set the color.
Set R, G, B in the range of 0…2 .
If you set a value in excess of one , each color component can double the brightness.
Set A in the range of 0…1 .
LINE_SPACE = line spacing pixel value¶
It defines the gaps between the content.
LINE_SPACE = 8; //Put an 8-dot space.You cannot specify a percentage.
GROUP = SCROLLBAR Control ID,…¶
If you set scroll controls to the GROUP property,it display scroll bars in conjunction with the editbox.
It should be careful not to set to CONTENTS.
It is also possible to assign multiple scrollbars.
GROUP = SCROLLBAR(Horizon),SCROLLBAR(Vertical);
** STYLE ** = style 0 | style 1 | .. | style n¶
set the editbox style.
The editbox style |
Description |
---|---|
EDIT_BLIND |
Mask the input characters |
EDIT_ALL |
The default is possible that all of the character input. |
EDIT_TYPE_ASCIICAPABLE |
ASCII array keyboard |
EDIT_TYPE_URL |
URL input keyboard |
EDIT_TYPE_NUMBERANDPUNCTUATION |
Number and punctuation keyboard |
Numberpad keyboard |
PIN keyboard |
EDIT_TYPE_PHONEPAD |
Phone pad keyboard |
EDIT_TYPE_NAMEPHONEPAD |
name phone pad keyboard |
EDIT_TYPE_EMAILADDRESS |
email address keyboard |
You can set the display anchor of control.
Display position anchor flag |
Description |
---|---|
ANCHOR_DEFAULT |
Set the anchor position in the upper left Same as ANCHOR_LEFTTOP The default control center position is set to BASE_LEFT. |
ANCHOR_LEFTTOP |
Set the anchor position in the upper left The default control center position is set to BASE_LEFT. |
ANCHOR_LEFT |
Set the anchor position to the left. And vertical centering The default control center position is set to BASE_LEFT. |
ANCHOR_LEFTBOTTOM |
Set the anchor position to the left. Located along the lower edge The default control center position is set to BASE_LEFTBOTTOM. |
ANCHOR_TOP |
Set the anchor position to the upper side Centering at lateral. The default control center position is set to BASE_TOP. |
ANCHOR_CENTER |
Set the anchor position in the center of the window The default control center position is set to BASE_CENTER. |
ANCHOR_BOTTOM |
Set the anchor position at the bottom Centering at lateral. The default control center position is set to BASE_BOTTOM. |
ANCHOR_RIGHTTOP |
Set the anchor position in the upper right The default control center position is set to BASE_RIGHTBOTTOM. |
ANCHOR_RIGHT |
Set the anchor position to the right And vertical centering The default control center position is set to BASE_RIGHT. |
ANCHOR_RIGHTBOTTOM |
Set the anchor position to the right Located along the lower edge The default control center position is set to BASE_RIGHTBOTTOM. |
You can set the center position of the control.
Base position change flag |
Description |
---|---|
BASE_DEFAULT |
It varies depending on the anchor flag . If you do not specifically set , this value is set . See the description of each anchor flag |
BASE_LEFTTOP |
Set the center position to the upper left side. |
BASE_LEFT |
Set the center position to the left side. and vertical centering. |
BASE_LEFTBOTTOM |
Set the center position to the bottom left side. |
BASE_TOP |
Set the center position to the upper side. and horizontal centering |
BASE_CENTER |
Set the center position to the center. |
BASE_BOTTOM |
Set the center position to the bottom side. And horizontal centering. |
BASE_RIGHTTOP |
Set the center position to the upper right side. |
BASE_RIGHT |
Set the center position to the right side. and horizontal centering |
BASE_RIGHTBOTTOM |
Set the center position to the bottom right side. |
Change the font decoration of the caption .
You can change the font decoration of the caption . |
Description |
---|---|
TEXT_NORMAL |
No decoration |
TEXT_BOLD |
Bold type |
TEXT_DENT |
Dent type |
TEXT_SHADOW |
Shadow Type |
Style that limits the function as follows .
Function limit style |
Description |
---|---|
HIDE |
Hide. |
DISABLE |
It is not able to pressing the control. And the control color darken. |
NOHIT |
It is not able to pressing the control. |
NOBOUNCES |
When you’ve stopped it to scroll ,it is stopped even if there are still the momentum. |
SCROLL_UNLOCK |
Enable the scroll of contents. |
SCROLL_LOCK |
Disable the scroll of contents. |