1 override of SelectionLength
System.Windows.Forms (1)
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (1)
1048public override int SelectionLength
56 writes to SelectionLength
System.Windows.Forms (9)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (3)
847EditTextBox.SelectionLength = 0; 4349EditTextBox.SelectionLength = 0; 4679EditTextBox.SelectionLength = 0;
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (1)
1064set => base.SelectionLength = value;
System\Windows\Forms\Controls\TextBox\MaskedTextBox.cs (2)
2009SelectionLength = 0; 2840SelectionLength = 0;
System\Windows\Forms\Controls\TextBox\TextBoxBase.cs (2)
221SelectionLength = length; 1685SelectionLength = 0;
System\Windows\Forms\Controls\ToolStrips\ToolStripTextBox.cs (1)
322set { TextBox.SelectionLength = value; }
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\LinkAreaEditor.LinkAreaUI.cs (1)
146_sampleEdit.SelectionLength = linkArea.Length;
System.Windows.Forms.Tests (45)
MaskedTextBoxTests.cs (1)
652control.SelectionLength = value.Length;
TextBoxBaseTests.ClipboardTests.cs (15)
21SelectionLength = 2 27control.SelectionLength = 2; 44SelectionLength = 2 51control.SelectionLength = 2; 67SelectionLength = 2 85control.SelectionLength = 2; 104SelectionLength = 2 111control.SelectionLength = 2; 127SelectionLength = 2 145control.SelectionLength = 2; 175SelectionLength = 2 189SelectionLength = 2 194control.SelectionLength = 2; 212control.SelectionLength = 2; 237control.SelectionLength = 2;
TextBoxBaseTests.cs (28)
2645SelectionLength = selectionLength, 2666SelectionLength = selectionLength, 2688SelectionLength = selectionLength, 2710SelectionLength = selectionLength 2814SelectionLength = value 2822control.SelectionLength = value; 2843SelectionLength = value 2850control.SelectionLength = value; 2878control.SelectionLength = value; 2888control.SelectionLength = value; 2913control.SelectionLength = value; 2931Assert.Throws<ArgumentOutOfRangeException>("value", () => control.SelectionLength = -1); 3018SelectionLength = 2, 3086SelectionLength = 1 3272SelectionLength = selectionLength, 3439SelectionLength = selectionLength, 3901SelectionLength = 2 3921SelectionLength = 2, 3942SelectionLength = 2, 4153SelectionLength = 2 4179control.SelectionLength = 2; 4204control.SelectionLength = 2; 4230SelectionLength = 2 5467SelectionLength = 2, 5985SelectionLength = 0 6004SelectionLength = 5 6874SelectionLength = 2 6912SelectionLength = 2
TextBoxTests.cs (1)
632SelectionLength = 2,
WinFormsControlsTest (1)
DragDrop.cs (1)
221textBox.SelectionLength = 0;
79 references to SelectionLength
System.Windows.Forms (13)
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxEditingControl.cs (8)
129if ((RightToLeft == RightToLeft.No && !(SelectionLength == 0 && SelectionStart == Text.Length)) || 130(RightToLeft == RightToLeft.Yes && !(SelectionLength == 0 && SelectionStart == 0))) 141if ((RightToLeft == RightToLeft.No && !(SelectionLength == 0 && SelectionStart == 0)) || 142(RightToLeft == RightToLeft.Yes && !(SelectionLength == 0 && SelectionStart == Text.Length))) 152int end = SelectionStart + SelectionLength; 164|| SelectionStart + SelectionLength < Text.IndexOf("\r\n", StringComparison.Ordinal))) 173if (SelectionLength != Text.Length) 190if (SelectionLength > 0 ||
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (1)
1054return base.SelectionLength;
System\Windows\Forms\Controls\TextBox\TextBox.cs (1)
589if (SelectionLength == 0 && MouseButtons == MouseButtons.None)
System\Windows\Forms\Controls\TextBox\TextBoxBase.cs (2)
211if (SelectionLength != 0) 1052Select(value, SelectionLength);
System\Windows\Forms\Controls\ToolStrips\ToolStripTextBox.cs (1)
321get { return TextBox.SelectionLength; }
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\LinkAreaEditor.LinkAreaUI.cs (1)
120Value = new LinkArea(_sampleEdit.SelectionStart, _sampleEdit.SelectionLength);
System.Windows.Forms.Tests (65)
MaskedTextBoxTests.cs (1)
596control.SelectionLength.Should().Be(0);
System\Windows\Forms\DataGridViewTextBoxEditingControlTests.cs (7)
112Assert.Equal(0, control.SelectionLength); 1463Assert.Equal(4, control.SelectionLength); 1470Assert.Equal(4, control.SelectionLength); 1477Assert.Equal(0, control.SelectionLength); 1496Assert.Equal(0, control.SelectionLength); 1503Assert.Equal(0, control.SelectionLength); 1510Assert.Equal(4, control.SelectionLength);
TextBoxBaseTests.cs (54)
2595Assert.Equal(0, control.SelectionLength); 2649Assert.Equal(0, control.SelectionLength); 2671Assert.Equal(0, control.SelectionLength); 2693Assert.Equal(0, control.SelectionLength); 2722Assert.Equal(0, control.SelectionLength); 2770Assert.Equal(0, control.SelectionLength); 2777Assert.Equal(0, control.SelectionLength); 2788Assert.Equal(0, control.SelectionLength); 2797Assert.Equal(0, control.SelectionLength); 2817Assert.Equal(expected, control.SelectionLength); 2824Assert.Equal(expected, control.SelectionLength); 2845Assert.Equal(expected, control.SelectionLength); 2851Assert.Equal(expected, control.SelectionLength); 2880Assert.Equal(expected, control.SelectionLength); 2890Assert.Equal(expected, control.SelectionLength); 2992Assert.Equal(0, control.SelectionLength); 2999Assert.Equal(0, control.SelectionLength); 3056Assert.Equal(0, control.SelectionLength); 3066Assert.Equal(0, control.SelectionLength); 3225Assert.Equal(0, control.SelectionLength); 3236Assert.Equal(0, control.SelectionLength); 3279Assert.Equal(expectedSelectionLength, control.SelectionLength); 3290Assert.Equal(expectedSelectionLength, control.SelectionLength); 3309Assert.Equal(0, control.SelectionLength); 3320Assert.Equal(0, control.SelectionLength); 3344Assert.Equal(0, control.SelectionLength); 3357Assert.Equal(0, control.SelectionLength); 3388Assert.Equal(0, control.SelectionLength); 3401Assert.Equal(0, control.SelectionLength); 3453Assert.Equal(0, control.SelectionLength); 3467Assert.Equal(0, control.SelectionLength); 3868Assert.Equal(0, control.SelectionLength); 3886Assert.Equal(0, control.SelectionLength); 3906Assert.Equal(expectedSelectionLength, control.SelectionLength); 3927Assert.Equal(expectedSelectionLength, control.SelectionLength); 3949Assert.Equal(expectedSelectionLength, control.SelectionLength); 3972Assert.Equal(0, control.SelectionLength); 4001Assert.Equal(0, control.SelectionLength); 4218Assert.Equal(0, control.SelectionLength); 4234Assert.Equal(0, control.SelectionLength); 5491Assert.Equal(2, control.SelectionLength); 5504Assert.Equal(2, control.SelectionLength); 6235Assert.Equal(expectedSelectionLength, control.SelectionLength); 6242Assert.Equal(expectedSelectionLength, control.SelectionLength); 6265Assert.Equal(expectedSelectionLength, control.SelectionLength); 6275Assert.Equal(expectedSelectionLength, control.SelectionLength); 6325Assert.Equal(0, control.SelectionLength); 6332Assert.Equal(0, control.SelectionLength); 6346Assert.Equal(4, control.SelectionLength); 6353Assert.Equal(4, control.SelectionLength); 6372Assert.Equal(0, control.SelectionLength); 6382Assert.Equal(0, control.SelectionLength); 6407Assert.Equal(4, control.SelectionLength); 6417Assert.Equal(4, control.SelectionLength);
TextBoxTests.cs (3)
105Assert.Equal(0, control.SelectionLength); 656Assert.Equal(0, control.SelectionLength); 669Assert.Equal(0, control.SelectionLength);