1. Outline
A text box is a control that allows the app user to enter text. The contents entered into a text box can be stored in a database, and processing can be branched out based on the judgment of the retrieved contents.
In the following, we will use the term "2. Development GuidanceYou can download sample programs for frequently used functions in the text box at3. Parameterssection provides a reference to the parameters to be set in the text box.
2. Development Guidance
This article introduces parameter settings that are commonly used to familiarize you with text boxes. The sample projects used in the explanation can be downloaded from the following links.
2-1. Create text with placeholders
2-1-1. Set placeholders
Placeholders can be set to display a message when nothing is entered in a text box. It is useful for filling in input guides and other information.
In the Properties area, go to Data Placeholders and set what you want to appear in the text box. Similarly, from "Data" "Contents" you can set initial values for text boxes.
2-1-2. Set the design
The design of the text box is set in the Properties area under Design Color and Shape.
Here, the normal font and border colors are set to dark blue, and the placeholders are set to light gray.
Check Wrap text and multi-line input, set display content to top-left alignment and larger thickness.
2-2. Display error messages for input contents
Creating Error Message Output Logic
You can set an input suffix to detect when you do not want certain characters, such as passwords or file names, to be entered. The logic for outputting an error message when detected can be configured to display an error message when a specific single-character input is detected.
Creating Logic
Before we get into setting up the text box, we need to create the logic that will be set up in the text box.
From the "Process" design function, set the "Message"/"Show Message Box" logic.
The logic is as follows "! " is not available" message appears.
2-2-3. Tie text boxes to logic
Return to the "Screen" design function, select the placed text box, set the logic created above to "Processing when specific suffix is detected" in "Object" "Behavior settings" in the Properties area, and set the "Specific suffix (hex)" to "21".
This sets up the "Specific Suffix Detection Processing" to be executed when a "! (exclamation mark) at the end of a text box entry.
21 is the value obtained by converting "!" to hexadecimal ASCII code.
"!" If you wish to implement error checking for characters other than "!", set the corresponding ASCII code for that character.
For ASCII codes, please refer to the following.
Wikipedia JIS X 0201
https://ja.wikipedia.org/wiki/JIS_X_0201
2-2-4. Gradation
The background color is set as a gradient.
Select the placed text box and choose a color from the "Background Color" column in the "Normal" row of the "Design" "Color and Shape" property area, then choose the "Gradient" setting.
2-2-5. With background image
Select the placed text box and in the Properties area, under Design Image, click on Standard Image and select an image file.
The position is set to the lower left, bottom and right aligned.
Select inscribed fit to fit the smaller height and width of the text control,
The image is scaled down while maintaining the aspect ratio.
2-3. Other operational settings
You can also set restrictions on "input content" such as half-width or full-width characters, as well as the length of character strings that can be input.
In addition, by checking the "Password" checkbox, the contents of the text box will be made invisible with the ● notation.
If "Pop-up Input" is checked, a window will pop up to allow you to type in the text box.
2-4. Linking to databases
2-4-1. Preparing tables
Create a table to link with the database. In the sample project, it is defined as "Product Master".
Register "Item Name", "Physical Item Name" and "Type" in "Design" of the created table, respectively.
Prepare the following data in the stored data.
Set up a data form on the form.
Click where no controls are placed on the form, and set "Product Master" created above to "Table Name" under "Data" "Contents".
2-4-2. Display the contents of the product master table in a table
Prepare a table as a view to display the contents of the database in real time.
Create a table control and select "Data" "Contents" "Form".
Since the stored data described above created 3 cases, the number of displayed cases is set to 3.
Press the Display Item button to display the "Display Item Settings" screen, and set the items as shown in the figure below.
2-4-3. Set up data forms
Select the text, then select the form under Data Contents.
The field name is set to price.
3. Parameters
By changing the parameters, you can easily set the position and size of text boxes, colors and shapes, and images to be displayed, so let's take advantage of them to create a well-designed, easy-to-understand screen.
In addition, by setting up actions to be invoked during screen operations, you can make the app perform various actions when the app user types in a text box or when he/she types in a text box.
object
Basic information and behavior settings for text boxes are set from "Object". By making the text box inactive, it is possible to set up a text box that becomes active only when the app user performs certain operations, etc.
Basic Information
name | The name of the text box. For example, if you want the text box to have behavior from the processing logic, Designate a text box with this name. The default is "text + sequential numbers". |
---|---|
pop-up Title. |
For pop-up input or input specified as date and time, Specifies the title of the dialog to be displayed. If the popup title is blank, the name of the control is It appears in the title of the pop-up. |
Size | The width and height of the text box can be specified in 1-pixel increments. Yes. |
position | You can specify the position of the text box. The starting point is the upper left corner of the screen. |
margin | It is possible to create a blank area in a text box where no text or image is displayed. Can be done. Specified by the distance from the top and bottom of the text box to the left and right. |
information | You can check the type of control. No changes can be made. |
style | By selecting from the pre-defined styles, parameters such as colors, borders, etc. can be set. Easy to set up. |
operation setup
executable process | Touch or click the text box, Sets the process to be executed after release. |
---|---|
long press (of button, esp. mobile phones) | Executed when a text box is pressed and held (for more than 1 second) Set up the process. |
pushdown operation | Set the process to be executed the moment the text box is pressed, and Yes. |
When specific suffix is detected | Detects the value set in the "Specific suffix (hexadecimal) input field The following settings are used to determine the process to be executed when the |
IME control (Windows only) | When focusing on a text box on a Windows terminal Set initial IME mode to [No change][Disabled][Full-width Hiragana]. Full-width kana][Full-width alphanumeric characters][Half-width kana][Half-width alphanumeric characters][Half-width kana][Half-width alphanumeric characters][Half-width kana][Half-width kana][Half-width alphanumeric characters Choose from one of the following |
input contents | The string that can be entered in the text box is set to [All][Half-width alphanumeric Only][Numeric only][Double-byte katakana only][Date/Time][Date][Time][Time][Date Choose from one of the following |
At picker/tap Complete your selection (iOS only) |
When [Date/Time][Date][Time] is selected in [Input Contents]. You can choose to Complete the selection when you tap the picker. Select this option if you want to |
Maximum length | Sets the maximum length of a string that can be entered in a text box I will do so. |
maximum length unit | The unit of length set in "Maximum Length" is set to [Characters][Bytes (UTF-8)][Bytes (UTF-16)][Bytes (UTF-32)] [Bytes(Shift-JIS)][Bytes(JIS)][Bytes(EUC-JP) Choose from one of the following |
(computer) password | If checked, the string entered in the text box will be hidden by ●. Also, in that case Multiple lines of input will not be allowed. |
required entry (e.g. in online forms) | By checking the box,Control/Enter Required The logic is executed by using the The setting will be set. |
pop-up input | By checking the checkbox, when entering text A dialog pops up to enter text in the Make sure it is displayed. |
When entering text Use system font/ Android |
If checked, the Android device will display the string being typed as It will be displayed in the system font. |
When entering text Use system font / iOS |
If checked, the iOS device will display the string being typed as It will be displayed in the system font. |
When entering text Use system font/ Windows |
If checked, the Windows terminal will display the string being typed as It will be displayed in the system font. |
Cursor position when focusing | Select how the cursor is controlled when the focus is applied from [Follow Project Settings], [End], [Top], or [Select All]. |
Specific suffix (hexadecimal) | This is the occurrence flag for "Processing when a specific suffix is detected. You can enter character strings in hexadecimal ASCII code. |
When specific suffix is detected Maintain input |
By checking the checkbox, "Specific suffix (hexadecimal) When a "value set in the number) input field" is detected, the focus is removed. The following is a list of the most important factors that must be taken into consideration when selecting a new product. |
Note] About IME control
If you are using an IME other than Microsoft IME (Japanese), the operation of the IME control function is not guaranteed.
Note: If only numerical values are entered
Even if the input is only numbers, some characters can be entered in addition to Arabic numerals. Which characters can be entered depends on the operating system.
possibility
available | By unchecking this checkbox, the text box can be deactivated (operation disabled). Can be done. A text box that cannot be pressed until certain conditions are met. Used for installation, etc. |
---|---|
display | Uncheck this box to hide the text box. For example, when setting up a text box that will not be displayed until certain conditions are met. Use. |
... | Check this box if you want to use abbreviated characters. |
data
Settings for text and images to be displayed in text boxes are made in the "Data" section. In addition to direct input, text extracted from a form or database can be displayed.
Contents
value entry
Sets the text display in the text box for direct input.
character | You can enter text that will appear in the text box. |
---|---|
blank form | of the displayed text.format ruleSet the |
form
Sets the text display in a text box when the text is entered using a data form.
Field Name | The table set in the form is used as the destination for display content. Select a field (column). |
---|---|
blank form | of the displayed text.format ruleSet the |
available | When a text box is placed in a subform list, for each row Select the field from which to obtain the availability settings. |
display | When a text box is placed in a subform list, for each row Select the field from which to retrieve the display settings. |
foreground | When a text box is placed in a subform list, for each row Select the field from which the foreground color setting will be retrieved. |
background color | When a text box is placed in a subform list, for each row Select the field from which to obtain the background color setting. |
table
Set this option if the text display in a text box is to be entered using a database, rather than being set in advance.
table name | Select the table from which to retrieve the display content. |
---|---|
Field Name | Select the field (column) in the table from which to retrieve the display content. |
blank form | of the displayed text.format ruleSet the |
available | When a text box is placed in a subform list, for each row Select the field from which to obtain the availability settings. |
display | When a text box is placed in a subform list, for each row Select the field from which to retrieve the display settings. |
foreground | When a text box is placed in a subform list, for each row Select the field from which the foreground color setting will be retrieved. |
background color | When a text box is placed in a subform list, for each row Select the field from which to obtain the background color setting. |
placeholder
value entry
Sets the placeholder text display for direct input.
character | You can enter placeholders that will appear in the text box. |
---|---|
blank form | of the placeholder displayed.format ruleSet the |
form
Sets the character display for placeholders when they are entered using data forms.
Field Name | The table set in the form to which the placeholder will be retrieved from. Select a field (column). |
---|
table
Set this option if the character display for placeholders is to be entered using a database, rather than being set in advance.
table name | Select the table from which the placeholder will be retrieved. |
---|---|
Field Name | Field (column) in the table from which the placeholder will be obtained Select the |
Filter/Direct input | Extraction conditions when retrieving placeholders from a table. Select this option for direct input. |
Filter/List Selection | Extraction conditions when retrieving placeholders from a table. Select to select from a list. |
design
To set the color, shape, and image of a text box regardless of style, change "Design". The design of the text box can be set in detail.
Color and Shape
font | Specifies the font type. |
---|---|
Size | Specifies the font size. |
bold-type | Check this box if you want to bold text. |
image | Check this box if you want to add shadows to the text. |
underline | Select the underline for the text from [None], [Underline], or [Double Underline]. |
stroke-count line | Check this box if you want to put a strikeout on the text. |
by return | Check this box if you want the text to wrap around. |
multiline (command, e.g.) | Check this box if you want to enter the value of the display content on multiple lines. |
Shrink to Fit | When the content does not fit within the control, the font size will be automatically adjusted to fit the content inside. |
vertical alignment | Align Top][Align Center Top][Align Center Bottom] for text position in text box [Select from one of the following options: Align Bottom |
horizontal arrangement | Align Left][Align Left][Align Right] for text position in text box Select from any of the following options: [Align Right], [Align Left], [Align Right], or [Align Right]. |
normal font | Specifies the font color during normal operation. |
Normal Fill | Specifies the normal background color. |
Normal ruled/box lines | Specifies the color of the ruled/framed lines during normal operation. |
unavailable font | Specifies font color when operation is disabled. |
unavailable fill | Specifies the background color when the operation is disabled. |
Unavailable ruled lines/frames | Specifies the color of the ruled/border line when the operation is disabled. |
placeholder font | Specifies the font color of the placeholder. |
line thickness | Specifies the thickness of the line. |
roundness | Specifies the roundness of the corners of the text box. |
thickness | Specifies the thickness of the text box. |
Change image
Vertical/horizontal alignment of text (example)
Text: Aligned at top left Text: Aligned at center Text: Aligned at bottom right
|
|
|
Gradient (example)
|
image
Standard Image | You can set the image that is displayed during normal operation. |
---|---|
Image Deletion | You can clear the standard image settings. |
pressed image |
You can set an image to be displayed while pressing the text box. To clear the set image, click the Delete Image button. |
Invalid standard image |
You can set the image to be displayed when the operation is disabled. To clear the set image, click the Delete Image button. |
invalid pressed image |
You can set the image that is displayed while the text box is pressed when the operation is disabled. To clear the set image, click the Delete Image button. |
Image display position (vertical) | Align Top][Align Center Top][Align Center Bottom] for the image display position in the text box. [Select from one of the following options: Align Bottom |
Image display position (horizontal) | Align Left][Align Left][Align Left][Align Left][Align Right] for the image display position in the text box. Select from any of the following options: [Align Right], [Align Left], [Align Right], or [Align Right]. |
Single-sided fit | Size the image to fit inside the text box. Change. No setting][inscribed fit][circumscribed fit][circumscribed fit][inscribed fit][circumscribed fit][circumscribed fit Select from any of the following options: [Vertical/horizontal fit |
Image display position (example)
|
|
|
Single-sided fitting of an image (e.g.)
|
|
|
|
ruled line
top kind | Specifies the type of upper ruled line. |
---|---|
overglaze | Specifies the color of the upper border. |
lower kinds | Specifies the type of lower border. |
underglaze color | Specifies the color of the lower border. |
left kind | Specifies the type of left border. |
left-handedness | Specifies the color of the left border. |
Right kind | Specifies the type of right border. |
dark indigo (almost black) | Specifies the color of the right border. |
Backslash type | Specifies the type of backspace ruled line. |
backslash | Specifies the color of the backslash border. |
/ Type | / Specify the type of ruled line. |
/Color | / Specifies the color of the top border. |