Propriedade TextBox.ScrollBars (Script do Outlook Forms)
Returns or sets an Integer that specifies whether a control has vertical scroll bars, horizontal scroll bars, or both. Leitura/gravação.
Sintaxe
expressão. Scrollbars
expression Uma variável que representa um objeto TextBox.
Comentários
The settings for ScrollBars are:
Valor | Descrição |
---|---|
0 | Não exibe barras de rolagem (padrão). |
1 | Exibe uma barra de rolagem horizontal. |
2 | Exibe uma barra de rolagem vertical. |
3 | Exibe ambas uma barra de rolagem horizontal e vertical. |
A scroll bar constrains its scroll box to the visible region of the scroll bar. It also modifies the scroll position as needed to keep the entire scroll bar visible. The range of a scroll bar changes when the value of the ScrollBars property changes, the scroll size changes, or the visible size changes.
For a single-line control, you can display a horizontal scroll bar by using the ScrollBars and AutoSize properties. Scroll bars are hidden or displayed according to the following rules:
When ScrollBars is set to 0, no scroll bar is displayed.
When ScrollBars is set to 1 or 3, the control displays a horizontal scroll bar if the text is longer than the edit region and if the control has enough room to include the scroll bar underneath its edit region.
When AutoSize is True, the control enlarges itself to accommodate the addition of a scroll bar unless the control is at or near its maximum size.
For a multiline TextBox, you can display scroll bars by using the ScrollBars, WordWrap, and AutoSize properties. Scroll bars are hidden or displayed according to the following rules:
When ScrollBars is set to 0, no scroll bar is displayed.
When ScrollBars is set to 2 or 3, the control displays a vertical scroll bar if the text is longer than the edit region and if the control has enough room to include the scroll bar at the right edge of its edit region.
When WordWrap is True, the multiline control will not display a horizontal scroll bar. A maioria dos controles multiline não usa uma barra de rolagem horizontal.
A multiline control can display a horizontal scroll bar if the following conditions occur simultaneously:
- The edit region contains a word that is longer than the edit region's width.
The control has enabled horizontal scroll bars.
The control has enough room to include the scroll bar under the edit region.
The WordWrap property is set to False.
Suporte e comentários
Tem dúvidas ou quer enviar comentários sobre o VBA para Office ou sobre esta documentação? Confira Suporte e comentários sobre o VBA para Office a fim de obter orientação sobre as maneiras pelas quais você pode receber suporte e fornecer comentários.