83 references to RichTextBoxScrollBars
System.Windows.Forms (7)
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (7)
92private static readonly BitVector32.Section s_scrollBarsSection = BitVector32.CreateSection((short)RichTextBoxScrollBars.ForcedBoth, s_allowOleObjectsSection); 103ScrollBars = RichTextBoxScrollBars.Both; 431if (!WordWrap && Multiline && (ScrollBars & RichTextBoxScrollBars.Horizontal) != 0) 436if (Multiline && (ScrollBars & RichTextBoxScrollBars.Vertical) != 0) 633[DefaultValue(RichTextBoxScrollBars.Both)] 636public RichTextBoxScrollBars ScrollBars 638get => (RichTextBoxScrollBars)_richTextBoxFlags[s_scrollBarsSection];
System.Windows.Forms.Design (1)
System\ComponentModel\Design\MultilineStringEditor.MultilineStringEditorUI.cs (1)
47ScrollBars = RichTextBoxScrollBars.Both;
System.Windows.Forms.Tests (75)
System\Windows\Forms\RichTextBoxTests.cs (75)
118Assert.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)] 215public void RichTextBox_CreateParams_GetMultiline_ReturnsExpected(bool multiline, bool wordWrap, RichTextBoxScrollBars scrollBars, int expectedStyle) 2907foreach (RichTextBoxScrollBars value in Enum.GetValues(typeof(RichTextBoxScrollBars))) 2916public void RichTextBox_ScrollBars_Set_GetReturnsExpected(bool autoSize, RichTextBoxScrollBars value) 2941yield return new object[] { false, RichTextBoxScrollBars.Both, 0 }; 2942yield return new object[] { false, RichTextBoxScrollBars.ForcedBoth, 0 }; 2943yield return new object[] { false, RichTextBoxScrollBars.ForcedHorizontal, 0 }; 2944yield return new object[] { false, RichTextBoxScrollBars.ForcedVertical, 0 }; 2945yield return new object[] { false, RichTextBoxScrollBars.Horizontal, 0 }; 2946yield return new object[] { false, RichTextBoxScrollBars.None, 0 }; 2947yield return new object[] { false, RichTextBoxScrollBars.Vertical, 0 }; 2949yield return new object[] { true, RichTextBoxScrollBars.Both, 0 }; 2950yield return new object[] { true, RichTextBoxScrollBars.ForcedBoth, 1 }; 2951yield return new object[] { true, RichTextBoxScrollBars.ForcedHorizontal, 1 }; 2952yield return new object[] { true, RichTextBoxScrollBars.ForcedVertical, 1 }; 2953yield return new object[] { true, RichTextBoxScrollBars.Horizontal, 1 }; 2954yield return new object[] { true, RichTextBoxScrollBars.None, 1 }; 2955yield return new object[] { true, RichTextBoxScrollBars.Vertical, 1 }; 2960public void RichTextBox_ScrollBars_SetWithParent_GetReturnsExpected(bool autoSize, RichTextBoxScrollBars value, int expectedParentLayoutCallCount) 3008yield return new object[] { autoSize, RichTextBoxScrollBars.Both, 0, 0 }; 3009yield return new object[] { autoSize, RichTextBoxScrollBars.ForcedBoth, 1, 1 }; 3010yield return new object[] { autoSize, RichTextBoxScrollBars.ForcedHorizontal, 0, 1 }; 3011yield return new object[] { autoSize, RichTextBoxScrollBars.ForcedVertical, 1, 1 }; 3012yield return new object[] { autoSize, RichTextBoxScrollBars.Horizontal, 0, 1 }; 3013yield return new object[] { autoSize, RichTextBoxScrollBars.None, 0, 1 }; 3014yield return new object[] { autoSize, RichTextBoxScrollBars.Vertical, 0, 1 }; 3020public void RichTextBox_ScrollBars_SetWithHandle_GetReturnsExpected(bool autoSize, RichTextBoxScrollBars value, int expectedLayoutCallCount, int expectedCreatedCallCount) 3064yield return new object[] { false, RichTextBoxScrollBars.Both, 0, 0, 0 }; 3065yield return new object[] { false, RichTextBoxScrollBars.ForcedBoth, 1, 1, 1 }; 3066yield return new object[] { false, RichTextBoxScrollBars.ForcedHorizontal, 0, 0, 1 }; 3067yield return new object[] { false, RichTextBoxScrollBars.ForcedVertical, 1, 1, 1 }; 3068yield return new object[] { false, RichTextBoxScrollBars.Horizontal, 0, 0, 1 }; 3069yield return new object[] { false, RichTextBoxScrollBars.None, 0, 0, 1 }; 3070yield return new object[] { false, RichTextBoxScrollBars.Vertical, 0, 0, 1 }; 3072yield return new object[] { true, RichTextBoxScrollBars.Both, 0, 0, 0 }; 3073yield return new object[] { true, RichTextBoxScrollBars.ForcedBoth, 1, 1, 1 }; 3074yield return new object[] { true, RichTextBoxScrollBars.ForcedHorizontal, 0, 1, 1 }; 3075yield return new object[] { true, RichTextBoxScrollBars.ForcedVertical, 1, 1, 1 }; 3076yield return new object[] { true, RichTextBoxScrollBars.Horizontal, 0, 1, 1 }; 3077yield return new object[] { true, RichTextBoxScrollBars.None, 0, 1, 1 }; 3078yield return new object[] { true, RichTextBoxScrollBars.Vertical, 0, 1, 1 }; 3083public 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)] 3149public void RichTextBox_ScrollBars_SetInvalidValue_ThrowsInvalidEnumArgumentException(RichTextBoxScrollBars value)