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