Hide

SftMask/OCX 7.0 - ActiveX Masked Edit Control

Display
Print

Built-In Caption

SftMask/OCX provides an easy to use built-in caption which is displayed at a user-definable position, relative to the edit control (see Caption.Position). The alignment of the caption can be defined both horizontally and vertically (using Caption.Alignment and Caption.VerticalAlignment). The text of the caption is defined using the Caption.Text property. The caption can be defined as transparent (using Caption.Transparent), so the background of the enclosing form or dialog is used as background for the caption's text.

The caption can include an accelerator key. By using the & character in the Caption.Text property, the following character becomes an accelerator key. If the user types Alt plus the defined accelerator key, the Masked Edit control receives the input focus. For example, if the Caption.Text property is set to "Today's &Date", the displayed caption will read "Today's Date", i.e., the D is underlined. If the user types Alt+d, the Masked Edit control receives the input focus. To display an & character use "&&".

The caption can be hidden by setting the Caption.SizePercent and the Caption.Width properties to 0.

The size of the caption depends on the position of the caption as defined using the Caption.Position property and the AutoSize and Caption.SizePercent properties:

PositionAutoSizeSizePercentDescription
0 - positionSftMaskLeftFalse0-100The caption width is defined by the Caption.SizePercent or Caption.Width properties. The width of the caption is the specified percentage of the overall control width. The edit control is displayed in the remaining area to the right of the caption. The height of the caption and the edit control is equivalent to the overall height of the control, as defined at design-time.
True0-100The caption width is defined by the Caption.SizePercent or Caption.Width properties. The width of the caption is the specified percentage of the overall control width. The edit control is displayed in the remaining area to the right of the caption. The height of the caption and the edit control is automatically determined based on the attributes of the caption and edit control, such as the Caption.Font and the control's Font property.
2 - positionSftMaskRightFalse0-100The caption width is defined by the Caption.SizePercent or Caption.Width properties. The width of the caption is the specified percentage of the overall control width. The edit control is displayed in the remaining area to the left of the caption. The height of the caption and the edit control is equivalent to the overall height of the control, as defined at design-time.
True0-100The caption width is defined by the Caption.SizePercent or Caption.Width properties. The width of the caption is the specified percentage of the overall control width. The edit control is displayed in the remaining area to the left of the caption. The height of the caption and the edit control is automatically determined based on the attributes of the caption and edit control, such as the Caption.Font and the control's Font property.
1 - positionSftMaskTopFalse0-100The caption height is defined by the Caption.SizePercent or Caption.Width properties. The height of the caption is the specified percentage of the overall control height. The edit control is displayed in the remaining area below the caption. The height of the edit control is automatically determined based on the attributes of the edit control, such as the control's Font property. The width of the caption and the edit control is equivalent to the overall width of the control, as defined at design-time.
True0-100The Caption.SizePercent or Caption.Width properties are ignored. The edit control is displayed below the caption. The height of the caption and the edit control is automatically determined based on the attributes of the caption and edit control, such as the Caption.Font and the control's Font property. The width of the caption and the edit control is equivalent to the overall width of the control, as defined at design-time.
3 - positionSftMaskBottomFalse0-100The caption height is defined by the Caption.SizePercent or Caption.Width properties. The height of the caption is the specified percentage of the overall control height. The edit control is displayed in the remaining area below the caption. The height of the edit control is automatically determined based on the attributes of the edit control, such as the control's Font property. The width of the caption and the edit control is equivalent to the overall width of the control, as defined at design-time.
True0-100The Caption.SizePercent or Caption.Width properties are ignored. The edit control is displayed above the caption. The height of the caption and the edit control is automatically determined based on the attributes of the caption and edit control, such as the Caption.Font and the control's Font property. The width of the caption and the edit control is equivalent to the overall width of the control, as defined at design-time.

Last Updated 08/13/2020 - (email)
© 2024 Softel vdm, Inc.