83 references to RichTextBoxScrollBars
System.Windows.Forms (7)
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (7)
92
private static readonly BitVector32.Section s_scrollBarsSection = BitVector32.CreateSection((short)
RichTextBoxScrollBars
.ForcedBoth, s_allowOleObjectsSection);
103
ScrollBars =
RichTextBoxScrollBars
.Both;
431
if (!WordWrap && Multiline && (ScrollBars &
RichTextBoxScrollBars
.Horizontal) != 0)
436
if (Multiline && (ScrollBars &
RichTextBoxScrollBars
.Vertical) != 0)
633
[DefaultValue(
RichTextBoxScrollBars
.Both)]
636
public
RichTextBoxScrollBars
ScrollBars
638
get => (
RichTextBoxScrollBars
)_richTextBoxFlags[s_scrollBarsSection];
System.Windows.Forms.Design (1)
System\ComponentModel\Design\MultilineStringEditor.MultilineStringEditorUI.cs (1)
47
ScrollBars =
RichTextBoxScrollBars
.Both;
System.Windows.Forms.Tests (75)
System\Windows\Forms\RichTextBoxTests.cs (75)
118
Assert.Equal(
RichTextBoxScrollBars
.Both, control.ScrollBars);
187
[InlineData(true, true,
RichTextBoxScrollBars
.Both, 0x56210044)]
188
[InlineData(true, true,
RichTextBoxScrollBars
.ForcedBoth, 0x56212044)]
189
[InlineData(true, true,
RichTextBoxScrollBars
.ForcedHorizontal, 0x56010044)]
190
[InlineData(true, true,
RichTextBoxScrollBars
.ForcedVertical, 0x56212044)]
191
[InlineData(true, true,
RichTextBoxScrollBars
.Horizontal, 0x56010044)]
192
[InlineData(true, true,
RichTextBoxScrollBars
.None, 0x56010044)]
193
[InlineData(true, true,
RichTextBoxScrollBars
.Vertical, 0x56210044)]
194
[InlineData(true, false,
RichTextBoxScrollBars
.Both, 0x563100C4)]
195
[InlineData(true, false,
RichTextBoxScrollBars
.ForcedBoth, 0x563120C4)]
196
[InlineData(true, false,
RichTextBoxScrollBars
.ForcedHorizontal, 0x561120C4)]
197
[InlineData(true, false,
RichTextBoxScrollBars
.ForcedVertical, 0x562120C4)]
198
[InlineData(true, false,
RichTextBoxScrollBars
.Horizontal, 0x561100C4)]
199
[InlineData(true, false,
RichTextBoxScrollBars
.None, 0x560100C4)]
200
[InlineData(true, false,
RichTextBoxScrollBars
.Vertical, 0x562100C4)]
201
[InlineData(false, true,
RichTextBoxScrollBars
.Both, 0x560100C0)]
202
[InlineData(false, true,
RichTextBoxScrollBars
.ForcedBoth, 0x560100C0)]
203
[InlineData(false, true,
RichTextBoxScrollBars
.ForcedHorizontal, 0x560100C0)]
204
[InlineData(false, true,
RichTextBoxScrollBars
.ForcedVertical, 0x560100C0)]
205
[InlineData(false, true,
RichTextBoxScrollBars
.Horizontal, 0x560100C0)]
206
[InlineData(false, true,
RichTextBoxScrollBars
.None, 0x560100C0)]
207
[InlineData(false, true,
RichTextBoxScrollBars
.Vertical, 0x560100C0)]
208
[InlineData(false, false,
RichTextBoxScrollBars
.Both, 0x560100C0)]
209
[InlineData(false, false,
RichTextBoxScrollBars
.ForcedBoth, 0x560100C0)]
210
[InlineData(false, false,
RichTextBoxScrollBars
.ForcedHorizontal, 0x560100C0)]
211
[InlineData(false, false,
RichTextBoxScrollBars
.ForcedVertical, 0x560100C0)]
212
[InlineData(false, false,
RichTextBoxScrollBars
.Horizontal, 0x560100C0)]
213
[InlineData(false, false,
RichTextBoxScrollBars
.None, 0x560100C0)]
214
[InlineData(false, false,
RichTextBoxScrollBars
.Vertical, 0x560100C0)]
215
public void RichTextBox_CreateParams_GetMultiline_ReturnsExpected(bool multiline, bool wordWrap,
RichTextBoxScrollBars
scrollBars, int expectedStyle)
2907
foreach (
RichTextBoxScrollBars
value in Enum.GetValues(typeof(
RichTextBoxScrollBars
)))
2916
public void RichTextBox_ScrollBars_Set_GetReturnsExpected(bool autoSize,
RichTextBoxScrollBars
value)
2941
yield return new object[] { false,
RichTextBoxScrollBars
.Both, 0 };
2942
yield return new object[] { false,
RichTextBoxScrollBars
.ForcedBoth, 0 };
2943
yield return new object[] { false,
RichTextBoxScrollBars
.ForcedHorizontal, 0 };
2944
yield return new object[] { false,
RichTextBoxScrollBars
.ForcedVertical, 0 };
2945
yield return new object[] { false,
RichTextBoxScrollBars
.Horizontal, 0 };
2946
yield return new object[] { false,
RichTextBoxScrollBars
.None, 0 };
2947
yield return new object[] { false,
RichTextBoxScrollBars
.Vertical, 0 };
2949
yield return new object[] { true,
RichTextBoxScrollBars
.Both, 0 };
2950
yield return new object[] { true,
RichTextBoxScrollBars
.ForcedBoth, 1 };
2951
yield return new object[] { true,
RichTextBoxScrollBars
.ForcedHorizontal, 1 };
2952
yield return new object[] { true,
RichTextBoxScrollBars
.ForcedVertical, 1 };
2953
yield return new object[] { true,
RichTextBoxScrollBars
.Horizontal, 1 };
2954
yield return new object[] { true,
RichTextBoxScrollBars
.None, 1 };
2955
yield return new object[] { true,
RichTextBoxScrollBars
.Vertical, 1 };
2960
public void RichTextBox_ScrollBars_SetWithParent_GetReturnsExpected(bool autoSize,
RichTextBoxScrollBars
value, int expectedParentLayoutCallCount)
3008
yield return new object[] { autoSize,
RichTextBoxScrollBars
.Both, 0, 0 };
3009
yield return new object[] { autoSize,
RichTextBoxScrollBars
.ForcedBoth, 1, 1 };
3010
yield return new object[] { autoSize,
RichTextBoxScrollBars
.ForcedHorizontal, 0, 1 };
3011
yield return new object[] { autoSize,
RichTextBoxScrollBars
.ForcedVertical, 1, 1 };
3012
yield return new object[] { autoSize,
RichTextBoxScrollBars
.Horizontal, 0, 1 };
3013
yield return new object[] { autoSize,
RichTextBoxScrollBars
.None, 0, 1 };
3014
yield return new object[] { autoSize,
RichTextBoxScrollBars
.Vertical, 0, 1 };
3020
public void RichTextBox_ScrollBars_SetWithHandle_GetReturnsExpected(bool autoSize,
RichTextBoxScrollBars
value, int expectedLayoutCallCount, int expectedCreatedCallCount)
3064
yield return new object[] { false,
RichTextBoxScrollBars
.Both, 0, 0, 0 };
3065
yield return new object[] { false,
RichTextBoxScrollBars
.ForcedBoth, 1, 1, 1 };
3066
yield return new object[] { false,
RichTextBoxScrollBars
.ForcedHorizontal, 0, 0, 1 };
3067
yield return new object[] { false,
RichTextBoxScrollBars
.ForcedVertical, 1, 1, 1 };
3068
yield return new object[] { false,
RichTextBoxScrollBars
.Horizontal, 0, 0, 1 };
3069
yield return new object[] { false,
RichTextBoxScrollBars
.None, 0, 0, 1 };
3070
yield return new object[] { false,
RichTextBoxScrollBars
.Vertical, 0, 0, 1 };
3072
yield return new object[] { true,
RichTextBoxScrollBars
.Both, 0, 0, 0 };
3073
yield return new object[] { true,
RichTextBoxScrollBars
.ForcedBoth, 1, 1, 1 };
3074
yield return new object[] { true,
RichTextBoxScrollBars
.ForcedHorizontal, 0, 1, 1 };
3075
yield return new object[] { true,
RichTextBoxScrollBars
.ForcedVertical, 1, 1, 1 };
3076
yield return new object[] { true,
RichTextBoxScrollBars
.Horizontal, 0, 1, 1 };
3077
yield return new object[] { true,
RichTextBoxScrollBars
.None, 0, 1, 1 };
3078
yield return new object[] { true,
RichTextBoxScrollBars
.Vertical, 0, 1, 1 };
3083
public void RichTextBox_ScrollBars_SetWithParentWithHandle_GetReturnsExpected(bool autoSize,
RichTextBoxScrollBars
value, int expectedLayoutCallCount, int expectedParentLayoutCallCount, int expectedCreatedCallCount)
3146
[InvalidEnumData<
RichTextBoxScrollBars
>]
3147
[InlineData(
RichTextBoxScrollBars
.Both + 1)]
3148
[InlineData(
RichTextBoxScrollBars
.ForcedHorizontal - 1)]
3149
public void RichTextBox_ScrollBars_SetInvalidValue_ThrowsInvalidEnumArgumentException(
RichTextBoxScrollBars
value)