1 write to _listBox
System.Windows.Forms.Design (1)
System\ComponentModel\Design\CollectionEditor.CollectionEditorCollectionForm.cs (1)
422
_listBox
= new FilterListBox();
100 references to _listBox
System.Windows.Forms.Design (100)
System\ComponentModel\Design\CollectionEditor.CollectionEditorCollectionForm.cs (100)
97
foreach (ListItem item in
_listBox
.SelectedItems)
145
_listBox
.BeginUpdate();
155
_listBox
.Items.Add(created);
161
_listBox
.EndUpdate();
167
UpdateItemWidths(
_listBox
.Items[^1] as ListItem);
177
_listBox
.ClearSelected();
178
_listBox
.SelectedIndex =
_listBox
.Items.Count - 1;
180
object[] items = new object[
_listBox
.Items.Count];
183
items[i] = ((ListItem)
_listBox
.Items[i]).Value;
190
if (
_listBox
.Items.Count > 0 &&
_listBox
.SelectedIndex !=
_listBox
.Items.Count - 1)
192
_listBox
.ClearSelected();
193
_listBox
.SelectedIndex =
_listBox
.Items.Count - 1;
204
_listBox
.ItemHeight = Font.Height + SystemInformation.BorderSize.Width * 2;
225
int c = Math.Max(2,
_listBox
.Items.Count);
226
SizeF sizeW = g.MeasureString(c.ToString(CultureInfo.CurrentCulture),
_listBox
.Font);
234
SizeF size = g.MeasureString(GetDisplayText(item),
_listBox
.Font);
259
_listBox
.Items.Clear();
334
int index =
_listBox
.SelectedIndex;
335
if (index ==
_listBox
.Items.Count - 1)
340
int ti =
_listBox
.TopIndex;
341
(
_listBox
.Items[index + 1],
_listBox
.Items[index]) = (
_listBox
.Items[index],
_listBox
.Items[index + 1]);
343
if (ti <
_listBox
.Items.Count - 1)
345
_listBox
.TopIndex = ti + 1;
348
_listBox
.ClearSelected();
349
_listBox
.SelectedIndex = index + 1;
389
_listBox
.KeyDown += ListBox_keyDown;
390
_listBox
.DrawItem += ListBox_drawItem;
391
_listBox
.SelectedIndexChanged += ListBox_SelectedIndexChanged;
392
_listBox
.HandleCreated += ListBox_HandleCreated;
406
[MemberNotNull(nameof(
_listBox
))]
443
resources.ApplyResources(
_listBox
, "listbox");
444
_listBox
.SelectionMode = (CanSelectMultipleInstances() ? SelectionMode.MultiExtended : SelectionMode.One);
445
_listBox
.DrawMode = DrawMode.OwnerDrawFixed;
446
_listBox
.FormattingEnabled = true;
447
_listBox
.Margin = new Padding(0, 3, 3, 3);
448
_listBox
.Name = "listbox";
449
_overArchingTableLayoutPanel.SetRowSpan(
_listBox
, 2);
498
_overArchingTableLayoutPanel.Controls.Add(
_listBox
, 0, 1);
532
if (!
_listBox
.IsHandleCreated)
537
using Graphics g =
_listBox
.CreateGraphics();
538
int old =
_listBox
.HorizontalExtent;
545
_listBox
.HorizontalExtent = w;
551
foreach (ListItem i in
_listBox
.Items)
560
_listBox
.HorizontalExtent = max;
571
ListItem item = (ListItem)
_listBox
.Items[e.Index];
575
int c =
_listBox
.Items.Count;
578
SizeF sizeW = g.MeasureString(maxC.ToString(CultureInfo.CurrentCulture),
_listBox
.Font);
636
if (width > e.Bounds.Width &&
_listBox
.HorizontalExtent < width)
638
_listBox
.HorizontalExtent = width;
691
object[] items = new object[
_listBox
.Items.Count];
694
items[i] = ((ListItem)
_listBox
.Items[i]).Value;
715
_listBox
.Items.Clear();
761
_listBox
.Items.Clear();
771
_listBox
.Items.Add(new ListItem(_editor, items[i]));
775
if (
_listBox
.Items.Count > 0)
777
_listBox
.SelectedIndex = 0;
815
int index =
_listBox
.SelectedIndex;
822
if (
_listBox
.SelectedItems.Count > 1)
824
List<ListItem> toBeDeleted = [..
_listBox
.SelectedItems.Cast<ListItem>()];
832
RemoveInternal((ListItem?)
_listBox
.SelectedItem);
835
if (index <
_listBox
.Items.Count)
837
_listBox
.SelectedIndex = index;
839
else if (
_listBox
.Items.Count > 0)
841
_listBox
.SelectedIndex =
_listBox
.Items.Count - 1;
862
int selectedItem =
_listBox
.SelectedIndex;
865
_listBox
.RefreshItem(
_listBox
.SelectedIndex);
875
_listBox
.Invalidate();
878
_propertiesLabel.Text = string.Format(SR.CollectionEditorProperties, GetDisplayText((ListItem?)
_listBox
.SelectedItem));
896
_listBox
.Items.Remove(item);
907
_listBox
.Items.Remove(item);
977
ActiveControl =
_listBox
;
993
int index =
_listBox
.SelectedIndex;
1003
int ti =
_listBox
.TopIndex;
1004
(
_listBox
.Items[index - 1],
_listBox
.Items[index]) = (
_listBox
.Items[index],
_listBox
.Items[index - 1]);
1008
_listBox
.TopIndex = ti - 1;
1011
_listBox
.ClearSelected();
1012
_listBox
.SelectedIndex = index - 1;
1039
bool editEnabled = (
_listBox
.SelectedItem is not null) && CollectionEditable;
1040
_removeButton.Enabled = editEnabled && AllowRemoveInstance(((ListItem)
_listBox
.SelectedItem!).Value);
1041
_upButton.Enabled = editEnabled &&
_listBox
.Items.Count > 1;
1042
_downButton.Enabled = editEnabled &&
_listBox
.Items.Count > 1;
1046
if (
_listBox
.SelectedItem is not null)
1054
items = [new SelectionWrapper(CollectionType, CollectionItemType,
_listBox
,
_listBox
.SelectedItems)];
1058
items = new object[
_listBox
.SelectedItems.Count];
1061
items[i] = ((ListItem)
_listBox
.SelectedItems[i]!).Value;
1065
int selectedItemCount =
_listBox
.SelectedItems.Count;
1069
_propertiesLabel.Text = string.Format(SR.CollectionEditorProperties, GetDisplayText((ListItem)
_listBox
.SelectedItem));