Parent-Child Relationships and New Toolbox Controls

Creating dynamic user interfaces efficiently using RFgen 5.1 has just gotten easier with our new layout controls and relationships between objects. In the RFgen Mobile Development Studio, we added parent-child relationships between forms and pages, and the ability to associate multiple child objects to a single parent object. This enables you to change or move multiple objects instantly through a parent object. For example, if you placed your company logo or banner and a message on your form (the parent), all pages would instantly inherit these objects exactly as they were placed and stylized on the form.

If you need to manage multiple child controls as a group, use the new Panel control. It enables you to easily perform group actions such as deleting, hiding or moving all child controls at once by deleting, hiding or moving the parent Panel control. The Layout control also helps keep objects (i.e. labels) aligned when a prompt changes its size at run time. For quick toggles between pages or prompt groups, we’ve added a TabControl which supports groups of controls contained on one or more tabs.

parent forms and child page relationships

Diagram 1: Parent form and child page relationships

panel, layout and tab control

Diagram 2: Panel, Layout and Tab Control

 

Key Benefits

  • Enables developers to rapidly design and create user interfaces.
  • Simplifies implementation where child controls inherit changes from the parent control.
  • Drives consistency and reduces errors where objects are repeatedly added.

Panel Control

The Panel Control, which provides containment of child controls, is easy to use. Simply drag the desired Panel control to the desired page, then select and drag your child control (i.e. Label) and drag it onto the Panel. To move a panel and its contents, select the panel, copy it and paste it on the destination page. If you wanted to conduct other actions such as hiding the panel, you can change the Visible property to False and all the child controls become invisible.

Example Panel and Parent Child Relationship View of Objects Prompts

 

Layout Control

The Layout Control uses columns and rows to maintain layout alignment at run time. Each column and row can automatically expand or shrink to accommodate the contents of a cell. For instance, you can use this feature on forms translated into German or long text entries (wrapped text). No coding is required to maintain alignment. To automate sizing, set the ColumnInfo SizeType property to “AutoSize.”

cycle count layout controlcycle count properties control panel

You can now set your main language text. In this example, the Cycle Count screen text is in English. At runtime, you can use the Text Translations in RFgen to populate the prompt labels based on the connecting device's locale. In this example, the prompts were populated with German text.

rfgen cycle count RFgen cycle count german

Since the Layout columns were both set to “AutoSize”, the first column expands to accommodate the longer German text. To maintain the textbox alignment, the Layout control shrinks the second column to allow the first column to grow.

 

TabControl

The TabControl enables users to select the desired tab at run time in order to use the interfaces on that tab. No coding is required to enable switching between tabs.

 rfgen maps route planning.png

 maps route planning rfgen application

At design time, specify how many tabs are required on the control and set the tab captions. Note: The width of the tabs is the total width of the tab control divided by the number of tabs. Once the captions are set, drag the required controls to the appropriate tabs. At run time the control will determine which tab is visible and switch the view based on the button the user selected.

Optional Methods for Displaying Tabs

The visible tab can also be controlled with the Prompt.Tab.Open VBA language extension. For example, to launch the other tab when a user double-clicks a delivery line item from the route list, use “TabControl.Tab.OpenTab(2)”.