613-518-1166 info@zimdatabases.com

ZIM Development Center (DC) for Zim 7

Adapting Tab Controls for a TUI Environment

< All Topics

Adapting Tab Controls for a TUI Environment

Tab Controls are unique to graphical environments, but can be required in cross-platform applications. In the TUI environment, the user interface is not driven by ‘tabs’ but by means the View menu. The tabs are not represented to the user in the display. The tabs sit behind the tab page frames. This is because of screen real estate and other factors, such as the absence of a mouse interface.

To add the View menu to drive tab controls, complete the following:

  1. Paint a new menu item with the menu label ‘View’.
  2. Add sub-menu items to View, one for each tab labelling them appropriately.
  3. For each sub-menu item assign a concatenated string of the menu name and the submenu name to the menu tag. For example, ‘ViewCustomer’.
  4. Add an ‘action’ statement to the action dispatcher procedure for each View menu item/tab page. Pass the tab number to plSetTabControl. For example in the code example, the following line would be added to zInterfaceClass:

when vlAction = ‘VIEWCUSTOMER’
plSetTabControl(1)
plTabPage(vlAction)
when vlAction = ‘VIEWPRODUCT’
plSetTabControl(2)
plTabPage(vlAction)

Check out Tab Controls in Action

Was this article helpful?
0 out Of 5 Stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
How can we improve this article?

Submit a Comment

Your email address will not be published. Required fields are marked *

Table of Contents