Drawing Controls


 

The Sunbelt Designer offers a number of methods to place controls onto form, panel, or printpage. Each method has its own advantages and is described below. Drawing controls consists of selecting a tool from the Toolbox window and adding it to the form or printpage. If the Toolbox is not visible, it can be shown by using the Windows/Toolbox menu selection or by pressing F5.

 

Before drawing controls, first select the correct parent object. A window, panel, tab control panel, or a printpage can serve as the parent for new objects. To draw on a panel or tab panel, first select the panel by clicking it. The sizing handles will indicate that the object is selected. When drawing on a panel, the grid is removed from the form and drawn on the panel. Note that Tab Panels (panels internally associated with Tab Control Objects) are always treated as locked objects and the selection handles will be red. As controls are added to the parent, the Outline window will show the parent/child relationship.

 

Draw Method

1.   In the Toolbox, select the tool you want by clicking on the tool.

2.   Click the form or printpage where you want to place the control.

3.   Mouse down and drag the cross hair to make the control the size you want.

 

DoubleClick Method

1.   In the Toolbox, double-click the tool you want. The control appears in the center of the form or printpage with a default size.

2.   Move and size the control as desired for your application.

 

Drag and Drop Method

1.   Mouse down on a control in the toolbox.

2.   While holding the mouse down, move the cursor to the position on the form or printpage where the object should be placed.

3.   Release the mouse button.

4.   A control of the selected type and with a default size is created at the point of the mouse release.

 

Multiple Objects of the Default Size

1.   Hold the Shift key down while clicking on a control in the toolbox.

2.   A control of the default size will be created at any point on the form or printpage where where mouse is clicked.

3.   Click the Pointer control to end object creation.

 

Multiple Objects of the Varying Size

1.   Hold the Control key down while clicking on a control in the toolbox.

2.   Click and draw as many controls of the selected type as desired on the form or printpage. Use the same drawing technique as described in the Draw Method above.

3.   Click the Pointer control to end object creation.

 

Array of Objects

1.   Hold the Alt key down while clicking on a control in the toolbox.

2.   A control of the default size will be created at any point on the form or printpage where where mouse is clicked.

3.   Each control will be created with the same object name and an increasing Index property value.

4.   Click the Pointer control to end object creation.



about_designer