skip to main content

Controls Reference : TAB-CONTROL : Styles : Allow-Container

Allow-Container
When this style is set, the Tab-Control becomes a real container control. There is no need to manage the tab switch by intercepting the CMD-TABCHANGED event and updating the screen with the DISPLAY verb. The tab switch is automatically managed by the runtime Framework. It simplifies the coding and also reduces traffic in thin client environment.
There are two ways to add controls to a Tab-Control with the Allow-Container style:
display scr-page-1 upon screen1-tc-1
or
       03  screen1-tc-1 tab-control
           tab-to-add ("Page1""Page2")
           allow-container.
       03  scr-page-1 tab-group screen1-tc-1, tab-group-value 1.
           05 entry-field 
       03  scr-page-2 tab-group screen1-tc-1, tab-group-value 2.
By default, LINE and COLUMN coordinates of controls displayed on the Tab-Control are relative to the window top-left border. To make them relative to the tab top-left border, apply the Relative-Offset style as well.
 
Example - Define a tab-control with two pages with the allow-container style
          03  screen-1-tc-1
              line                 2 
              col                  2
              lines                17 cells
              size                 68 cells
           03 screen-1-tc-1-page1 
              tab-group Tb1-container tab-group-value 1.
                 line           4
                 col            4
                 title          "This is the first page"
                 line           6
                 col            4
           03 screen-1-tc-1-page2 
              tab-group Tb1-container tab-group-value 2.
                 line           4
                 col            4 
                 title          "This is the second page"
                 line           6
                 col            4

Copyright (c) 2017 Veryant
Contact us
Please share your comments on this manual or on any
Veryant product documentation with the email button at the top left