Split Pane
Last updated
Last updated
The Split Pane component is a container that shows a 'left' (1) and a 'right' (2) form in it. It will show both forms at the same time, placed either horizontally or vertically, with a divider between them. These 2 forms can optionally show related data.
The divider's location can be modified either from code or directly by the user. It is suited for use in both Advanced (Responsive) and Simple CSS forms.
Here are the steps for creating a Split Pane:
Open the Form Editor of the form where you need to place a Split Pane
Find Split Pane in Form Containers section in the components' pallet
Drag and drop the Split Pane component in the desired place of the form
Set the panels' orientation by selecting splitType
property
Add pane1
and pane2
Add forms in containedForm
panels' property, where you set the name of the form you want to be displayed in each panel
Optionally, you can use a relation by selecting the relationName
property, where you set the relation between the main form and the contained form of the panel
Set pane1MinSize
(minimum size of first panel in pixels) and pane2MinSize
(minimum size of second panel in pixels)
Set the divider properties
Edit other Split Pane properties if needed
It is recommended to set a specific name
in the Split Pane properties in order to make it easier to use it later in scripting.
Example: "splitpane_orders"
.
The contained form of the panels can show related data. In order to do this, you need to have the following:
Set the datasource
property on the main form
Set the datasource
property on the contained form
Make sure that the relation from datasource table of the main form to datasource table of the contained form exists, otherwise it needs to be created
Set the above relation in the relationName
property of the corresponding panel
Once everything is set, the contained form will show related data according to the selected record in the main form. When the selected record changes in the main form, so will the related data from the contained form.
Divider location is set by using the divLocation property: sets the initial splitter div location, between 0 and 1 is a percentage, more than 1 is a value in pixels. If location is less than 1 (-1 or .5 = middle, lower then .5 = close to left/top, higher then .5 = close to right/bottom), then the location will be considered at (location * 100) percent of the split pane from left, otherwise it will represent the pixels from left.
Width of divider is set by using the divSize property, which represents the divider size in pixels.
Split Pane properties can be also set in the Scripting Editor. You can find a list of Split Pane API methods here.
Here is an example of how to programmatically set the contained form, including relationName, in the Scripting Editor of the main form:
Here is an example of how to save the previous divider location in the Scripting Editor of the main form and set the same for the next user session:
Saving the divider location in the onChange
event(fired after divider location changed) of the Split Pane container:
Checking if there is a saved previous divider location and set it in the onLoad
main form event: