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;
4357
EditTextBox.
SelectionLength
= 0;
4690
EditTextBox.
SelectionLength
= 0;
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (1)
1064
set => base.
SelectionLength
= value;
System\Windows\Forms\Controls\TextBox\MaskedTextBox.cs (2)
2015
SelectionLength
= 0;
2860
SelectionLength
= 0;
System\Windows\Forms\Controls\TextBox\TextBoxBase.cs (2)
221
SelectionLength
= length;
1693
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)
649
control.
SelectionLength
= value.Length;
TextBoxBaseTests.ClipboardTests.cs (15)
19
SelectionLength
= 2
25
control.
SelectionLength
= 2;
42
SelectionLength
= 2
49
control.
SelectionLength
= 2;
65
SelectionLength
= 2
83
control.
SelectionLength
= 2;
102
SelectionLength
= 2
109
control.
SelectionLength
= 2;
125
SelectionLength
= 2
143
control.
SelectionLength
= 2;
173
SelectionLength
= 2
187
SelectionLength
= 2
192
control.
SelectionLength
= 2;
210
control.
SelectionLength
= 2;
235
control.
SelectionLength
= 2;
TextBoxBaseTests.cs (28)
2643
SelectionLength
= selectionLength,
2664
SelectionLength
= selectionLength,
2686
SelectionLength
= selectionLength,
2708
SelectionLength
= selectionLength
2812
SelectionLength
= value
2820
control.
SelectionLength
= value;
2841
SelectionLength
= value
2848
control.
SelectionLength
= value;
2876
control.
SelectionLength
= value;
2886
control.
SelectionLength
= value;
2911
control.
SelectionLength
= value;
2929
Assert.Throws<ArgumentOutOfRangeException>("value", () => control.
SelectionLength
= -1);
3016
SelectionLength
= 2,
3084
SelectionLength
= 1
3270
SelectionLength
= selectionLength,
3437
SelectionLength
= selectionLength,
3899
SelectionLength
= 2
3919
SelectionLength
= 2,
3940
SelectionLength
= 2,
4151
SelectionLength
= 2
4177
control.
SelectionLength
= 2;
4202
control.
SelectionLength
= 2;
4228
SelectionLength
= 2
5465
SelectionLength
= 2,
5983
SelectionLength
= 0
6002
SelectionLength
= 5
6872
SelectionLength
= 2
6910
SelectionLength
= 2
TextBoxTests.cs (1)
630
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)
134
if ((RightToLeft == RightToLeft.No && !(
SelectionLength
== 0 && SelectionStart == Text.Length)) ||
135
(RightToLeft == RightToLeft.Yes && !(
SelectionLength
== 0 && SelectionStart == 0)))
146
if ((RightToLeft == RightToLeft.No && !(
SelectionLength
== 0 && SelectionStart == 0)) ||
147
(RightToLeft == RightToLeft.Yes && !(
SelectionLength
== 0 && SelectionStart == Text.Length)))
157
int end = SelectionStart +
SelectionLength
;
169
|| SelectionStart +
SelectionLength
< Text.IndexOf("\r\n", StringComparison.Ordinal)))
178
if (
SelectionLength
!= Text.Length)
195
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)
1059
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)
593
control.
SelectionLength
.Should().Be(0);
System\Windows\Forms\DataGridViewTextBoxEditingControlTests.cs (7)
110
Assert.Equal(0, control.
SelectionLength
);
1461
Assert.Equal(4, control.
SelectionLength
);
1468
Assert.Equal(4, control.
SelectionLength
);
1475
Assert.Equal(0, control.
SelectionLength
);
1494
Assert.Equal(0, control.
SelectionLength
);
1501
Assert.Equal(0, control.
SelectionLength
);
1508
Assert.Equal(4, control.
SelectionLength
);
TextBoxBaseTests.cs (54)
2593
Assert.Equal(0, control.
SelectionLength
);
2647
Assert.Equal(0, control.
SelectionLength
);
2669
Assert.Equal(0, control.
SelectionLength
);
2691
Assert.Equal(0, control.
SelectionLength
);
2720
Assert.Equal(0, control.
SelectionLength
);
2768
Assert.Equal(0, control.
SelectionLength
);
2775
Assert.Equal(0, control.
SelectionLength
);
2786
Assert.Equal(0, control.
SelectionLength
);
2795
Assert.Equal(0, control.
SelectionLength
);
2815
Assert.Equal(expected, control.
SelectionLength
);
2822
Assert.Equal(expected, control.
SelectionLength
);
2843
Assert.Equal(expected, control.
SelectionLength
);
2849
Assert.Equal(expected, control.
SelectionLength
);
2878
Assert.Equal(expected, control.
SelectionLength
);
2888
Assert.Equal(expected, control.
SelectionLength
);
2990
Assert.Equal(0, control.
SelectionLength
);
2997
Assert.Equal(0, control.
SelectionLength
);
3054
Assert.Equal(0, control.
SelectionLength
);
3064
Assert.Equal(0, control.
SelectionLength
);
3223
Assert.Equal(0, control.
SelectionLength
);
3234
Assert.Equal(0, control.
SelectionLength
);
3277
Assert.Equal(expectedSelectionLength, control.
SelectionLength
);
3288
Assert.Equal(expectedSelectionLength, control.
SelectionLength
);
3307
Assert.Equal(0, control.
SelectionLength
);
3318
Assert.Equal(0, control.
SelectionLength
);
3342
Assert.Equal(0, control.
SelectionLength
);
3355
Assert.Equal(0, control.
SelectionLength
);
3386
Assert.Equal(0, control.
SelectionLength
);
3399
Assert.Equal(0, control.
SelectionLength
);
3451
Assert.Equal(0, control.
SelectionLength
);
3465
Assert.Equal(0, control.
SelectionLength
);
3866
Assert.Equal(0, control.
SelectionLength
);
3884
Assert.Equal(0, control.
SelectionLength
);
3904
Assert.Equal(expectedSelectionLength, control.
SelectionLength
);
3925
Assert.Equal(expectedSelectionLength, control.
SelectionLength
);
3947
Assert.Equal(expectedSelectionLength, control.
SelectionLength
);
3970
Assert.Equal(0, control.
SelectionLength
);
3999
Assert.Equal(0, control.
SelectionLength
);
4216
Assert.Equal(0, control.
SelectionLength
);
4232
Assert.Equal(0, control.
SelectionLength
);
5489
Assert.Equal(2, control.
SelectionLength
);
5502
Assert.Equal(2, control.
SelectionLength
);
6233
Assert.Equal(expectedSelectionLength, control.
SelectionLength
);
6240
Assert.Equal(expectedSelectionLength, control.
SelectionLength
);
6263
Assert.Equal(expectedSelectionLength, control.
SelectionLength
);
6273
Assert.Equal(expectedSelectionLength, control.
SelectionLength
);
6323
Assert.Equal(0, control.
SelectionLength
);
6330
Assert.Equal(0, control.
SelectionLength
);
6344
Assert.Equal(4, control.
SelectionLength
);
6351
Assert.Equal(4, control.
SelectionLength
);
6370
Assert.Equal(0, control.
SelectionLength
);
6380
Assert.Equal(0, control.
SelectionLength
);
6405
Assert.Equal(4, control.
SelectionLength
);
6415
Assert.Equal(4, control.
SelectionLength
);
TextBoxTests.cs (3)
103
Assert.Equal(0, control.
SelectionLength
);
654
Assert.Equal(0, control.
SelectionLength
);
667
Assert.Equal(0, control.
SelectionLength
);