TDBNumber Control > TDBNumber Control and Object References > TDBNumber Caption Object Properties |
The TDBNumber control's Caption object allows you to design a functional input interface while eliminating the need to have a separate Label control for each field.
Captions can be added to the left, top, right, or bottom portion of the control, and can be aligned horizontally, vertically. The caption Text has its own Font object separate from the text within the control's data entry window.
The properties of the Caption object can be set with the Caption Property Page (TDBNumber) at design time, and can be set with Visual Basic code at run time.
The following code demonstrates how to change the caption's appearance at run time:
Example Title |
Copy Code
|
---|---|
With TDBNumber.Caption
.Text = "New Name"
.Font.Bold = True
.ForeColor = &HFF
End With
|
Note that all mouse-relative events are ignored by the Caption object. Clicking on the caption area will not cause the focus to move into the edit control.
All of the properties for the Caption object are documented in the following reference section: