Adding a "File Browse" Control to a Screen
Control Purpose
This control is used to display a file's content and, if required, to specify which data (field/record) is viewed on the screen.
It allows for the selection of any displayed records. Should this control be used, the data is stored in a variable to be further processed or stored. See Variable Definition.
Add a file browse to a screen by dragging a "File Browse" control from the top section of the "Control" tab OR the "Style Preview Section" onto the screen.
Step-by-step
1. Drag the control onto the screen:
•If dragged from the "Control" tab, the control will assume the default style. (See Set Default.)
•If dragged from the "Style Preview Section", it will assume that particular style.
2. Now, double-click the selected control on the screen OR the representation in the tree view to open the properties window.
The "General" tab is open by default.
3. In the "File Name" option, select the data file to be displayed from the existing data files in the drop-down list. If you need to edit the selected data file, click . See Editing a Data File.
4. Fill in the "Fields Selection" table:
Field Name column
Define the field position by selecting fields from the drop-down list (this list contains the fields of the previously selected data file).
Length column
Determine the length of each column.
Title column
Define each field name as it will appear on the device's screen. Either maintain the field names from the original file or create new ones.
Store Value column
Define the variable that stores what was selected. To store the information, click the corresponding and create/select a variable. See To Select/Create a Variable.
Use the editing icons to the right of the table to move the rows up and down and to delete or add more rows.
5. As an option, the number of the selected records can be stored in a variable. Create/select a variable in the "Store Selected Record Number(Optional)" option by clicking .
6. Go to the "Query" tab.
7. If required, define a query using "where conditions" in the "Where Clause" table. The Query Assistant will help you define the criteria for the necessary "Where" clause(s) (fields, operand, value type). Use the editing icons to the right of the table to move the rows up and down and to delete or add more rows.
1. Double-click the required row or click the corresponding
2. Fill in the resulting window as follows:
3. Click |
If the query is not needed, continue to the "Layout" tab (step 8).
8. Open the "Layout" tab.
9. Define the control's style by selecting an option from the drop-down list or by clicking . See Editing and Creating Styles and Editing and Creating the "File Browse" Style.
10. Maintain the given values or specify the control's position/size, within the screen, by providing the "X" and "Y" coordinates as well as "Width" and "Height".
Detail of Position/Size values
11. In the "Name" option, attribute a name to the control. This name is displayed in the tree view.
12. Consider whether or not to check the following options:
"Enable"
Activates the control's input feature.
"Tab Stop"
Must be checked to enable a "Change Tab Order". This provides the possibility to change the order (between data input controls) in which the information is keyed in by the operator.
"Visible"
Manages the control's visibility in the device's screen.
13. In the "File Browse Layout", define the following options:
"Columns to Lock"
Defines the number of columns to be locked in the table. This locking of columns begins from left to right.
"Header"
This option must be checked to ensure the viewing of the header.
"Footer"
The checking of this option allows for the addition of information at the bottom of the "File Browse" box. Text can be added, syntax commands can be written (consider the list below the box) or selected from the drop-down list.
Use the right-click in MCL-Designer's input boxes to access some related options as well as the general "Cut"; "Copy"; "Paste"; "Search"actions (active/inactive according to the current context).
Ex: If you right-click the "Text Data" input box (included in a "Display Text" properties window), you are provided with the general editing/search actions and other specific options such as "Variable Select" (see "Variable Select") ;"Variable Insert" (see "Variable Insert"), "Insert Special Character" (see To Insert Special Characters into a Control's Text Input Field) and "Localization Select" (see Localization List).
If you right-click any other input box, it may provide other possibilities.
Default event: "Change" - Is triggered when the operator selects a record or inputs data in the control.
Keep in mind there is always a default event (ex: "Change"; "Timer"; "Hotkey"; etc.) attached to the control (in this case, a "Change" event). If you want the event to trigger an action, you must add processes to it (ex: "Go To"; "Check File"; "Set Focus"; etc.).
15. If required, double-click the empty line below the event or click in the Editing Bar to add a process to the event . See Adding Processes to a Screen or a Control.
At this stage, the processes are being added to the default event (in this case, a "Change"). The default event can, however, be ignored/overridden by adding other events (step 17).
This control has predefined local variables (only available in event context). See File Browse's Predefined Local Variables.
16. If there is no need to add more events, click in the "Actions" tab to conclude the operation. If the project requires more events, proceed to step 17.
17. Click (at the bottom of the "Actions" tab) to add a new event.
18. Select one of the available events (A) for this control ("Timer" or "Hotkey") and edit it (B, C and D).
|
Timer |
HotKey |
A |
This event is an exception. The operator does NOT trigger an action, it is his lack of activity, associated to a predetermined period of time that triggers the action/process. |
This event is used to attribute a keystroke function (in a virtual or hardware keyboard) to the "File Browse". |
B |
Set the time interval, after which, the action that follows the event (a process) is executed. |
Select the keystroke function that the "File Browse" will represent. |
C |
If required, check this option to set a repetition cycle. |
Define the target/action to be executed after the event is triggered. Select one of the available destinations OR "<Action>", if you want to add other processes. |
D |
N/A |
This alternative to C provides quick links for a "Go to" action (ex: "Next Screen"; "Exit"; etc.) to be executed when the event is fulfilled. If you want to add other processes, select "<Action>". See Detail of a |
Detail of a window
This window is an alternative to the drop-down list of destinations: a. Select a destination screen or routine within the same program as this control, in the left table. b. Specify the target even more by selecting from the table to the right. The available options are a consequence of your choice in the left table. c. If you want to add other processes to the execution flow instead of defining a target with a Go to process, select the "<Action>" option. d. Finish this operation by clicking |
It is possible to add as many of the available events as required by the project. (Repeat steps 17 and 19)
19. Edit the new event(s). Double-click the event row to be edited and open the "Edit Event" window.
Ex: The editing of an added "Hotkey" event.
Define which keystroke function(in a virtual or hardware keyboard) the control represents.
Define the objective/action to be executed after the event is triggered. Select one of the available destinations from the drop-down or list OR select "<Action>", if you want to add other processes.
20. These new events can include processes. See Adding Processes to a Screen or a Control.
If you have more than one event, remember to select the event row you want to add processes to.
If you use the drag-and-drop method to add processes, make sure to drop the process on the row below the intended event.
Before concluding the addition operation, check the following:
Remember that the "Enable" option (located in the "Layout" tab) must be checked so that the added actions/processes run.
21. If required, use the icons located on the upper right corner of the properties window:
Click this icon to create a new data file. Go to Creating a Data File to see how to fill in the several options available.
Click this icon to open a "Localization" window where you can edit the text element within that control or add translations to it. See Localization.
Click this icon to attach any relevant notes to this control. Enter your text in the resulting window. This information is displayed in the "Developer report". See Report.
22. Click in the "Actions" tab to apply the choices made.
The "File Browse" has been successfully added to the screen.
If any subsequent edition of the control's properties is required, double-click the "File Browse" OR select "Edit" (in its right-click menu) to open the properties window.
If you want to view this control applied within an application, see Sample Applications.
File Browse's Predefined Local Variables
This control has predefined local variables (only available in event context).
Event |
Change |
|
Variable Name |
L_Control_Name |
L_Record_Number |
Variable ID |
&0a |
&1a |
Description |
Stores the control's name (*) |
Stores the selected line number (regarding all items in a data file) |
Event |
Hotkey |
Timer |
||
Variable Name |
L_Control_Name |
L_Keycode |
L_Entry_Type |
L_Control_Name |
Variable ID |
&0a |
&1a |
&2a |
&0a |
Description |
Stores the control's name (*) |
Stores the defined key code |
KB - Keyboard input VO - Speech input |
Stores the control's name (*) |
* Defined in the control's properties window ("Layout" tab).