If you plan to allow your users to resize screens at run-time, you can simplify the process of handling that screen with a layout manager. A layout manager is a tool that, given a certain set of rules, determines how the size and placement of screen controls change as the size of the screen shifts. The exact rules vary by layout manager; you can write your own or use the one provided as part of your ACUCOBOL-GT installation, called LM_RESIZE.
This topic describes how to use built-in AcuBench support for LM_RESIZE to create a resizable screen. For information about layout managers in general, as well as detailed information about the ACUCOBOL-GT resize layout manager, see Layout Managers.
To create a resizable screen that uses LM_RESIZE as its layout manager, do the following:
If Auto Resize has been set to TRUE, click in the Value column and use the drop-down list to change its value.
When you generate your program, AcuBench automatically creates a COPY file called lmresize.def to support layout manager functions within your program.
AcuBench also assigns a unique Layout Manager Handle property to the screen. You can change the name of the handle, but keep in mind that if you have multiple resizable screens in your application, each layout manager handle must be unique.
When you generate your program, AcuBench automatically creates a COPY file called lmresize.def to support layout manager functions within your program.
Note that AcuBench also assigns a unique Layout Manager Handle property to the screen. You can change the name of the handle, but keep in mind that if you have multiple resizable screens in your application, each layout manager handle must be unique.
Later, as you add controls to your screen, you can use the Layout Data property to determine exactly how the resize manager handles that control when the screen size changes. The Layout Data property is discussed in Layout Data Control Property.
Note that in order for the layout manager to function properly, you must also change the screen's Auto Resize property to FALSE.
The resize layout manager facility is demonstrated in an AcuBench sample project located in the Support area of the Micro Focus Web site.