Overlaying VBT's

The program Overlay.m3 illustrates the usage of a TSplit. A TSplit is a container window that gives its entire screen to one child at a time. The program constructs a Tsplit with 2 children and displays it along with a button labeled Next. Initially one of the two children will be displayed. Each time Next button is clicked, the other child will occupy whole of the Tsplit's window.

The current child can be obtained by calling:

Tsplit.GetCurrent
and a child can be set as TSplit's current child by calling:
Tsplit.SetCurrent

Two views of the application while it is running are shown in the following images:

The TSplit has two children, each a color picture. One picture is rare stamp, other other a windmill. The images are from files in the portable bitmap (pbm) format. A VBT can be made from a pbm file using the code given in the appendices. The module Picture prepares two VBTs stampVBT and wind_millVBT for easy inclusion into a Modula-3 program.