1. Outline
Subforms are controls that allow you to create sub-screens within a screen.
This is useful for placing scrolling display content in a specific area of the application screen, or for switching content only in a specific area.
In the following, we will use the term "2. Development GuidanceYou can download sample programs for frequently used subform functions at3. Parameterssection provides a reference to the parameters to be set in the subforms.
It is also possible to display sub-screens repeatedly in a list format within a subform. For specific implementation instructions, see "Repeatedly display sub-screensPlease refer to the "See
2. Development Guidance
This article introduces parameter settings that are commonly used to familiarize you with sub forms. The sample projects used in the explanation can be downloaded from the following links.
2-1. Creating a scrolling area in the screen
Subforms can be used to implement sub-screens that can be scrolled vertically.
2-1-1. Place sub forms and set initial values
Select "Sub Form" in the control bar and drag it on the screen to position the sub form.
With the placed sub form selected, set the "Width" and "Height" from "Object" > "Basic Settings" in the Properties area. In our sample, the width is set to 450 and the height to 510.
2-1-2. Create screens for sub forms
Create a screen to be displayed in the sub form area created in 2-1-1. The name shall be "10_Subform Green".
Create a new screen from the screen design function, and with the created screen selected, set the "Width" and "Height" from "Object" > "Basic Information" in the properties area. In our sample, the width is set to 450 and the height to 830.
To make it vertically scrollable, this time set the height to a value greater than the subform.
Also, the width should be aligned with the subform and screen to avoid scrolling left or right.
2-1-3. Create headers and footers for sub forms
Sub forms can have headers and footers.
Add a screen for the header and a screen for the footer, respectively, and set the "Width" and "Height" from "Object" > "Basic Information" in the properties area. In our sample, the width and height are both set to 450 and 30, respectively.
The width of this area is also aligned with the subform area.
2-1-4. Displaying screens on sub forms
With a sub form selected, you can assign the screen to be displayed to the sub form from "Object" > "Behavior Settings" in the Properties area.
The first step here is to set up the "10_Subform Green" screen to appear within a subform.
The layout shall be the size of the screen created.
With the settings up to this point, a sub-form that can be scrolled vertically is implemented.
2-2. Switching the display only in specific areas
Logic can be utilized to switch between sub-screens to be displayed in the subform area.
2-2-1. Create screens for sub forms
Add a screen named "11_Subform Red".
With the added screen selected, set the "Width" and "Height" from "Object" > "Basic Information" in the Properties area. In our sample, the width is set to 450 and the height to 450.
Since this is a non-scrolling type, the height is set to a smaller value than the subform.
Also, the width should be aligned with the subform and screen to avoid scrolling left or right.
2-2-2. Create a process to switch the display of screens in sub forms
According to the settings in 2-1-3, "10_Subform Green" is displayed in the subform area when the screen is activated, but you can switch which subform to display by pressing the switch button.
Open the Processing Design screen, create a new file "02_Switch to Subform Red" and set the logic as follows.
In #1 logic, the screen to be displayed in the sub form area (destination) is changed to "11_Sub Form Red". The details of the parameter settings are as follows
The process created here is set to execute the "Switch to Subform Red" button placed on the main screen.
Similarly, add a logic file named "01_Switch to Subform Green" and set up the logic as follows
In #1 logic, the contents of the sub form are changed to "10_Sub Form Green". The parameter settings are as follows.
The logic is now complete. The logic created is set as the execution process for the "Switch to Subform Green" button.
2-3. Link the DB to the screen to be displayed on the sub form.
Screens displayed in subforms can be configured for data forms in the same way as regular screens.
Normally, only one data form can be set up per screen, but by applying sub forms, multiple sub forms can be tied to a single parent screen, making it possible to create screens that perform updates to multiple tables.
2-3-1. Creating Tables
Create a new table from the DB design screen. In the sample project. It is created as "01_table_green".
In the "Design" section of the created table, register the "Item Name" and "Physical Item Name" and "Type" respectively as follows.
This table is associated with inputs 1 through 9 of the screen for the green sub form.
Create another new table from the DB design screen. In the sample project. It is created as "02_table_red".
In the "Design" section of the created table, register the "Item Name" and "Physical Item Name" and "Type" respectively as follows.
This table is associated with inputs 1 through 5 of the screen for the red subforms.
2-3-2. Set up data forms
Select "10_Subform_green" from the screen design screen, click on the form (screen), and select the table "01_table_green" created in "2-3-1. Create Table" above for the table name from "Data" > "Contents" in the properties area.
For text boxes on the screen, also set the column settings.
If text1, then input1
If it is text9, select input9.
Similarly, select "11_subform_red" from the screen design screen, click on the form, and select the table "02_table_red" created in "2-3-1. Create Table" above for the table name from "Data" > "Contents" in the properties area.
For text boxes on the screen, also set the column settings.
Repeat settings from Text 1~Text 5.
If text1, then input1
If the text is 5, select input5.
By making the above settings, the table will reflect the entries in each text box.
3. Parameters
By changing the parameters, you can easily set the position and size of sub forms, as well as the form to be displayed.
In addition, by setting up actions to be invoked during screen operations, you can have the app perform various actions when the app user swipes a subform.
object
Basic Information
name | Enter a control name. |
---|---|
Size | Specify the width and height of the control. |
position | Specify the position of the control from the left and from the top. |
margin | Specify the margins of the control from left, right, top and bottom. |
type | Displays the type of control. |
style | By selecting a pre-defined definition, various properties such as colors, borders, etc. can be set in a batch. You can set up. |
operation setup
Processing on down-swipe | When sub forms are displayed in list form, the display limit is exceeded. Select this option when there is processing at the moment of a down-swipe. |
---|---|
Processing on top swipe | When sub forms are displayed in list form, the display limit is exceeded. Select this option if there is processing at the moment of the top swipe. |
header | Select the form to be displayed as a header in the subform. |
Header Layout | Select the layout to be displayed as the header in the subform. |
particulars | Select the form to be displayed as a detailed statement in the subform. |
detailed layout | Select the layout to be displayed as a detailed statement in the subform. |
footer (e.g. of a file) | Select the form to be displayed as a footer in the subform. |
Footer Layout | Select the layout to be displayed as a footer in the subform. |
Minimum display magnification | Specifies the minimum magnification for the ability to zoom subforms. |
Maximum display magnification | Specifies the maximum magnification of the ability to zoom subforms. |
Swipe Sensitivity | Down swipe process and up swipe process until the event occurs. Specify the swipe width in unit pixels. |
list view | Check this box if you want to display sub forms in list form. |
- attention (heed)
- When "List Display" is checked and the sub-screen is set to be displayed repeatedly, when a control tied to the instantaneous processing of a press on a sub-screen is pressed during application execution, the button on a different line may be pressed when the data set is reloaded.
possibility
available | Check this box if you want to make the control available. |
---|---|
display | Check this box if you want to display the control. |
Bouncing. | Check if bouncing. |
The statement is in the screen. Even when it's contained. Bouncing. |
The size of the content of the subform details, |
design
Color and Shape
Normal ruled/box lines | Specifies the color of the ruled and framed lines. |
---|---|
unavailable font | Specifies the foreground color when disabled. |
unavailable fill | Specifies the background color when disabled. |
Unavailable ruled lines/frames | Specifies the color of the ruled and bordered lines when disabled. |
line thickness | Specifies the thickness of the line. |
roundness | Specify roundness. |
thickness | Specify the thickness. |