Class: cWebBaseControl [Abstract]

Properties  Events  Methods    Index of Classes

Web control base class

This is an abstract class and should never be used by a developer for object instantiation. While a developer could use this class for sub-classing, it is not encouraged.



Library: Web Application Class Library

Package: cWebBaseControl.pkg


cWebBaseControl is the web control base class. It is abstract and thus not intended for instantiation. All web controls are based on this class.

Web controls must be placed within a web container (cWebPanel, cWebPanel, cWebView or cWebModalDialog). Web objects may not be nested inside a web control (the exception being grids (cWebGrid), which may contain web column (cWebColumn) objects). A web control may reside with other web panel sibling objects. You may not mix web panels and web controls as siblings.

Web Control Size and Location

A web control's X coordinate placement and width is determined by its piColumnIndex and piColumnSpan properties and its parent's piColumnCount property. The parent piColumnCount property determines how many equally spaced columns are created. piColumnIndex determines which column the control starts in and piColumnSpan determines how many columns the control will span. The default piColumnIndex is 0, which means that each control is located on its own line and the default piColumnSpan is 1, which means it will span one column. The actual width is determined by the number of columns and the width of the panel. If indexes and spans are out of range, the framework will adjust the best it can by trying to fit within the panel.

The pbFillHeight property instructs a control to fill the remaining height of its panel. This is often used with grids and multi-line edits.

Control Labels

Controls support labels, which normally appear to the left of the control. pbShowLabel determines if a control should display a label. psLabel controls the content of the label. When a label is shown, the column width is split between the label and the control. By default, the first 120 pixels will be used by the label, while the remaining width will be used to render the control. This all occurs within the first column -- if the control spans additional columns, the control will be resized to fill those additional columns.

The width of a label can be set using piLabelOffset. The smaller the offset, the more space for the control. If you change the label offset for a control, you will often want to change this for all controls within the column so your controls align property to the left.

A label's position relative to the control (left, right, top, bottom) is set by peLabelPosition. A label's alignment (left, right, center) is set by peLabelAlign.