newman     VBWeb     VBSource     Portfolio    

RESIZE.BAS Reference

USER GUIDE

VBSource

EXAMPLES
AddChild
Establishes a relationship between a form and a control in it.
Syntax
Call AddChild(ChildControl, Move&Size)
Part
Description
ChildControl The control whose relationship to the form can be enforced. This control must have Left, Top, Width, and Height properties.
Move&Size Integer representing the size and position properties of ChildControl that should move when the relationship is enforced. See the Move&Size constants listed below.

Remarks
This relationship is enforced using the EnforceForm method. The form is gotten from the ChildControl.Parent property. Size and position constants for the same direction should not be combined in the Move&Size argument.
AddContents
Establishes a relationship between a container control other than a form and a control in the container.
Syntax
Call AddContents(ContentsControl, Move&Size, ContainerControl)
Part
Description
ContentsControl The control whose relationship to the ContainerControl can be enforced. This control must have Left, Top, Width, and Height properties.
Move&Size Integer representing the size and position properties of ContentsControl that should move when the relationship is enforced. See the Move&Size constants listed below.
ContainerControl Is often a Frame or Panel control. This control must have Width, and Height properties with at least read access at run-time.

Remarks
This relationship is enforced using the EnforceContainer method. ContentsControl should be drawn inside ContainerControl. Size and position constants for the same direction should not be combined in the Move&Size argument.

Settings
The Move&Size argument can have the following values for AddChild and AddContents
Constant
Value
Description
RE_LEFT 1 Both the left and right edges of the child move with the width of the parent.
RE_WIDTH 2 The width of the child moves with the width of the parent.
RE_TOP 4 Both the top and bottom of the child move with the height of the parent.
RE_HEIGHT 8 The height of the child moves with the height of the parent.

Example
You can add vertical constants to horizontal constants. This example defines the relationships of a bitmap editor that might contain a PictureBox with ScrollBars along the right side and bottom.
Call AddChild(VScroll1, RE_LEFT + RE_HEIGHT)
Call AddChild(HScroll1, RE_WIDTH + RE_TOP)
Call AddChild(Picture1, RE_WIDTH + RE_HEIGHT)

AddPane
Establishes a Parent/Child relationship between two sibling controls (same parent or container).
Syntax
Call AddPane(PaneControl, Move&Size, SashControl)
Part
Description
PaneControl The control whose relationship to the SashControl can be enforced. This control must have Left, Top, Width, and Height properties.
Move&Size Integer representing the size and position properties of PaneControl that should move when the relationship is enforced.
SashControl Is often used as a separator bar between two sides of a form. This control must have Left, Top properties with at least read access at run-time.

Settings
The Move&Size argument can have the following values for AddPane
Constant
Value
Description
RE_LEFT 1 Both the left and right edges of PaneControl move with the left edge of SashControl.
RE_WIDTH 2 The width of PaneControl moves with the left edge of SashControl.
RE_TOP 4 both the top and bottom of PaneControl move with the top of SashControl.
RE_HEIGHT 8 the height of PaneControl moves with the top of SashControl.

Remarks
This relationship is enforced using the EnforceSash method. Both controls must have Left, Top, Width, and Height properties. PaneControl and SashControl should have the same parent or container. In other words, they should both be drawn on the same form or container control. Size and position constants for the same direction can be combined to produce special conditions. Such a PaneControl is usually to the right or below SashControl. Take, for example, one ListBox control above another with a SashControl between them. Both the Top and Height properties of the lower PaneControl must change when the SashControl is enforced. Particular caution is taken by this module to make sure that the bottom edge of the lower PaneControl does not snap out of place.



Feedback Comments
Return Address (if you want a reply)


Copyright 1997 NEWMAN Services Corp. All rights reserved.
973-228-5753 pres@newmanservices.com
DECONSTRUCT THIS PAGE