Returns or sets which scrollbars are displayed in the ATexbBox object.
Object.ScrollBars [ = enATextbBoxScrollBars ]
The ScrollBars property syntax has the following parts:
Name |
Type |
Description |
Object |
ATextBox |
ATextBox control |
enATextbBoxScrollBars |
enumATextBoxScrollBars |
An integer specifying what style of scrollbars are displayed in the control. Applies only when MultiLine is TRUE. |
enumATextBoxScrollBars can be one of the following:
Name |
Value |
Description |
atbNone |
0* |
No scroll bars are displayed. |
atbHorizontal |
1 |
A horizontal scroll bar is displayed. |
atbVertical |
2 |
A vertical scroll bar is displayed. |
atbBoth |
3 |
Both horizontal and vertical scroll bars are displayed. |
This property have effect only when the MultiLine property is set to True.
You must place a line break "\r\n" to a string in order to force a line break in your text. If the control is in MultiLine mode and a horizontal scrollbar is not visible than the text displayed in the control will be word wrap to the next lines even if the line break does not exist.
The following statement appends string to the description text box depending on the scroll bar state:
if tbDesc.ScrollBars=atbVertical or tbDesc.ScrollBars=atbBoth
tbDesc.Text=GetDesc()
else
tbDesc.Text=GetDescFirstThreeLines() ! can't scroll so append 3 lines
endif
The following statement sets the property value:
tbDesc.ScrollBars=atbVertical