If we run out of space on a form, we generally use pageframes. We can also put the information on collapsing containers that we can implement with the class enclosed.

This is a subclass of an image class that can be dropped on any container to allow it to collapse / Expand.

It has the following properties

minHeight - Minimum height to which it will collapse. Keep at least 25 to show the image
minWidth - Minimum width to which it will collapse. Keep at least 25 to show the image
maxHeight - Height that it will expand to
maxWidth - Width that it will expand to
dockedBottom - If set to .T., the container will expand upwards. Default is .F.
dockedRight - If set to .T., the container will expand from right to left. Default is .F.
numberSteps - A timer is called every 20ms to expand/collapse the container. Enter the number of steps the resizing should take place in.

The methods are

expand - expand the container to its full size
collapse - collapse the container

Depending on the value of dockedBottom and dockedTop, the image will move to one of the corners of the container.

Clicking the image will expand / collapse the container.

12 Responses to Collapsing containers

Leave a Reply

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