WinStudio

About the Toolbar in Form-only Mode

Some forms are designed to be opened in "form-only mode," that is, they are forms designed to be viewed and used without standard toolbars or menu bars. Mobile forms are good examples of this type of form. Typically, this means that, if a toolbar is used, it has fewer options than most standard forms.

NOTE: When forms that are designed to be viewed in form-only mode are opened in a standard WinStudio client window or a standard Web client window, they use the standard WinStudio toolbar, with any custom toolbar buttons displayed to the right of the standard buttons.

The Form-only Mode Toolbar Display

Settings for form-only mode toolbars are made at the form level. The primary control that determines whether the toolbar displays at all, and if so where, is the DisplayMobileToolbar form variable. This variable has four options:

Displaying Buttons

To display on the toolbar, buttons must be set individually. To set a button to display when the toolbar is displayed:

  1. Open the form in Design mode.

  2. Select the Form properties tab, Collections subtab.  

  3. Under Standard Operations options, set the buttons you want to display to True.

Only those buttons set to True display when the toolbar is displayed. Available buttons include:

Displaying Record Counts

You can also display a count of records returned as part of the toolbar display for a form-only mode display. This record count display includes both the number of the current record being displayed and the number of total records returned; for example: 5 of 38

This record count display is controlled by the DisplayMobileCount form variable. When this variable is set to True, the record count is displayed, right-justified  in the toolbar.

Creating a Custom Toolbar Option

To create a custom toolbar option:

  1. With the form open in Design mode, add a component of type Toolbar Button to the form.
  2. In the Component Properties grid, set the component properties as desired.
    At the least, you should set the Name, Caption, and Bitmap File Name properties. Your graphics file should be 15x15 pixels, in .jpg or .png format.
  3. Save the form definition.

Now, when you set the DisplayMobileToolbar form variable to True, your custom toolbar button appears just to the right of any standard operation buttons you have chosen to display on the toolbar.

NOTE: When you create a custom toolbar button, the system is set to automatically display the button whenever the DisplayMobileToolbar form variable is set to True. Unlike the standard operations, there is no need to set a Standard Operations property to True.


Related Topics

About Mobile Form Design