Please enable JavaScript to view this site.

A-Shell Reference

Navigation: Subroutines > XTREE > XTREE Techniques

Controls in Container Windows

Scroll Prev Top Next More

You may place an XTREE control within a container window such as a Modal Dialog Box or Tab Control. In the case of dialogs, this is automatic. (That is, if a dialog box is active when the XTREE control is created, it will automatically be a child of that dialog, and it is not necessary to set the XTR_PARENTID parameter.) In the case of a Tab control, you must specify the control ID of the Tab control in the XTR_PARENTID parameter. In either case, the coordinates will be interpreted as being relative to the client area of the container window.

If you are going to open an XTREE in the middle of a screen, such that it will overlap other controls, it is highly recommended that you put it inside a dialog. Otherwise, to prevent the controls already present from "bleeding through" the XTREE, A-Shell will automatically save and delete any controls which overlap the XTREE's rectangle, and the restore them on exit. But that effect may seem a bit awkward, whereas a pop-up dialog is not only cleaner looking, but allows the user to move it around to see what is underneath. See the sample programs XTRA2 and XTRA5 for examples of XTREE controls within dialogs.