Text Box

Kalipso - Developing - Form - Controls - Type - Text Box

An Text Box is a frame that can contain text. Unlike Labels, an Text Box can be editable. You can link an Text Box to the Database. An Text Box can interact with the user through its Events. You should use this Control when you want to allow the user to edit text. Value - Its value is the displayed value.

For the control in question, when opening its properties, the following window appears:

Depending on the control chosen, the properties are different.

Properties

Tab - General

Common

  • Name - Name of the Control. This Name will be used to identify the Control throughout the Project. The name of the Control can only contain letters, digits or underscore (_).

  • Default Value - Default Value displayed in the Input Box. This is the initial value of the Input Box. No validation whatsoever is made over this value.

  • Hint Text - Value displayed while the Input Box is empty. This property is not displayed on Windows Mobile/CE devices.

  • Description - Not applicable to this control.

  • Plane - Plane of the Form where the Control should be created. Check the Planes chapter for more information.

  • Visible - With this option selected, the control is (or is not) visible.

  • State - With this option selected, the control can be configured to be: Editable; Disable; Read only

Layout

  • X - x position of the Control from left

  • Y - y position of the Control from top

  • Width - Width of the Control.

  • Height - Height of the Control

In relation to all these layout options, it is possible to set this value in runtime via the “Set Property” Action. You can also retrieve this value in runtime via the “Get Property” Action.

Miscellaneous

  • Input Type – Type of Input Box. The available input types are:

    • Alpha: The Input Box will accept alphanumeric chars.

    • Numeric: The Input Box will only accept numeric chars.

    • Date: The Input Box will only accept a valid date written in the format defined by the “Display Mask” property. If the date isn’t valid, the Input Box gets empty when it loses focus.

    • Time: The Input Box will only accept a valid time written in the format defined by the “Display Mask” property. If the time isn’t valid, the Input Box gets empty when it loses focus.

    • Timestamp: The Input Box will accept alphanumeric chars, but when refreshed, will fill with a composition of “Prefix” property plus a date in format YYYYMMDD and a time in format HHMMSSMMM.

    • Terminal ID: The Input Box will accept alphanumeric chars, but when refreshed, will fill withthe identification number defined in KConfig.exe.

    • Password: The Input Box will accept alphanumeric chars, but only shows asterisks (*).

    • DateTime: The Input Box will only accept a valid date and time written in the format defined by the “Display Mask” property. If the date and time isn’t valid, the Input Box gets empty when it loses focus.

  • Max. Length – Maximum length of the text inputted. This property is displayed only if the “Input Type” property is set to ‘Alpha’.

  • Multiline – Set the Input Box with multiline ability or not. This property is displayed only if the “Input Type” property is set to ‘Alpha’. If set, this property causes a scroll bar to be displayed in the Input Box at right.

Style

Appearance

  • Background - Background color of the Control. You can set the color for the background.

  • Opacity - Set the percentage of opacity for the background.

You can set this value is runtime via the “Set Property” Action. You can retrieve this value in runtime via the “Get Property” Action.

On the right side of the Style section, you can choose templates with pre-defined styles or configurable ones. By clicking on this option, the following style possibilities for the label appear:

  • Styles

    • None

    • Base

    • Underlined

Text

  • Font – Font of the displayed Text

  • Size – Font size of the displayed Text

  • Font Color – Font color of the displayed Text and/or select the code in the color picker.

In the font color you can set this value is runtime via the “Set Property” Action. You can retrieve this value in runtime via the “Get Property” Action.

  • Text Position – Position of the Text inside the Control

In Windows CE/Mobile this is only supported if the Input Box is Multiline.

  • Disable Text - Where you can choose the color for the type of text indicated.

  • Hint Text - Where you can choose the color for the type of text indicated.

Border

  • Border – To set or remove the frame around the Control. When choosing this option, the application allows the following types of border:

    • No – No border is displayed

    • Default - A frame is displayed around the Control

    • Customized Rectangle -

    • Customized Circle -

  • Line - Set the color of the line or select the code in the color picker.

  • Thickness – Thickness of the frame to be drawn around the Control

  • Rounded Corners – Allows to specify how the corners of the frame drawn around the Control should be drawn.

    • No - The corners of the frame drawn around the Control will be 90 degrees (rectangle)

    • Rounded Tops - Instead of drawing each corner, a semicircle is drawn in each top (left and right)

    • Specify Radius - Allows you to specify the radius of the semicircle to be draw in each corner of the Control

  • Radius - Radius of the semicircle to be draw in each corner of the Control

  • Borders - Choose which line of borders you want to add (left, right, top, bottom, all around).

You can activate or deactivate the Border through “Set Property” Action. You can know if it's active or not in runtime via the “Get Property” Action.

Source

  • Source – Origin of the data to show in the Input Box. The options are:

    • Nothing: Empty Input Box (depends on the “Input Type” property).

    • Database Table: Connect the Input Box with a Column of a Database Table.

    • Expression: Fill the Input Box with the result of an Expression.

Depending on the option previously chosen, you will need to complete the following fields:

Source Database Table:

There are two ways of connecting your Input Box to a Database Table therefore presenting the value of a specific Column. 1 – You can do it by simply defining the "Table" and "Column" properties and then using the "First Record"/"Last Record"/"Next Record"/"Previous Record" and "Refresh"/"Refresh Plane"/"Refresh Control" Actions. 2 – The other way is to implicitly define a "Select" statement. To do so, you have to define the "Table", "Column", "Where the value of" and "It’s equal to" properties then use the Refresh", "Refresh Plane" or "Refresh Control" Action. This way you are telling Kalipso to perform a "Select" statement like this: Select <Column> from <Table> where <Where the value of> = <It’s equal to>

Expression

Fill the Control with the result of – Expression whom result will be shown in the Input Box. For the Expression to be evaluated and fill the Input Box you’ll have to perform a "Refresh", "Refresh Plane" or "Refresh Control" Action.

Target

  • Mandatory - To define if the Input Box must be filled or not when performing a “Create Record”, “Update Record” or “Create/Update Record” Action. If this property is set, when Kalipso tries to use the value of this Input Box for executing one of the above Actions, it checks if the value is non empty; if it’s not, Kalipso will produce an automatic error message.

  • Global Variable - Global Variable where to store the Input Box value;

  • Local Variable - Local Variable where to store the Input Box value;

  • Database

    • Table - Table where to store the Input Box value;

    • Column - Column where to store the Input Box value;

The Text Box value is retrieved and stored in the corresponding Database Table and Column when you execute a "Create Record”, “Update Record” or “Create/Update Record” Action on the “Database Table”.

Tab - Actions

For each control, actions can be associated. For this, with the control selected, it is possible to access this tab and associate an action to the control. For more information on the actions available and how to use them click here.‌

Shortcuts

  • F2 - Actions

  • F3 - General Properties

Last updated