1 write to _listBox
System.Windows.Forms.Design (1)
System\ComponentModel\Design\CollectionEditor.CollectionEditorCollectionForm.cs (1)
408
_listBox
= new FilterListBox();
100 references to _listBox
System.Windows.Forms.Design (100)
System\ComponentModel\Design\CollectionEditor.CollectionEditorCollectionForm.cs (100)
83
foreach (ListItem item in
_listBox
.SelectedItems)
131
_listBox
.BeginUpdate();
141
_listBox
.Items.Add(created);
147
_listBox
.EndUpdate();
153
UpdateItemWidths(
_listBox
.Items[^1] as ListItem);
163
_listBox
.ClearSelected();
164
_listBox
.SelectedIndex =
_listBox
.Items.Count - 1;
166
object[] items = new object[
_listBox
.Items.Count];
169
items[i] = ((ListItem)
_listBox
.Items[i]).Value;
176
if (
_listBox
.Items.Count > 0 &&
_listBox
.SelectedIndex !=
_listBox
.Items.Count - 1)
178
_listBox
.ClearSelected();
179
_listBox
.SelectedIndex =
_listBox
.Items.Count - 1;
190
_listBox
.ItemHeight = Font.Height + SystemInformation.BorderSize.Width * 2;
211
int c = Math.Max(2,
_listBox
.Items.Count);
212
SizeF sizeW = g.MeasureString(c.ToString(CultureInfo.CurrentCulture),
_listBox
.Font);
220
SizeF size = g.MeasureString(GetDisplayText(item),
_listBox
.Font);
245
_listBox
.Items.Clear();
320
int index =
_listBox
.SelectedIndex;
321
if (index ==
_listBox
.Items.Count - 1)
326
int ti =
_listBox
.TopIndex;
327
(
_listBox
.Items[index + 1],
_listBox
.Items[index]) = (
_listBox
.Items[index],
_listBox
.Items[index + 1]);
329
if (ti <
_listBox
.Items.Count - 1)
331
_listBox
.TopIndex = ti + 1;
334
_listBox
.ClearSelected();
335
_listBox
.SelectedIndex = index + 1;
375
_listBox
.KeyDown += ListBox_keyDown;
376
_listBox
.DrawItem += ListBox_drawItem;
377
_listBox
.SelectedIndexChanged += ListBox_SelectedIndexChanged;
378
_listBox
.HandleCreated += ListBox_HandleCreated;
392
[MemberNotNull(nameof(
_listBox
))]
429
resources.ApplyResources(
_listBox
, "listbox");
430
_listBox
.SelectionMode = (CanSelectMultipleInstances() ? SelectionMode.MultiExtended : SelectionMode.One);
431
_listBox
.DrawMode = DrawMode.OwnerDrawFixed;
432
_listBox
.FormattingEnabled = true;
433
_listBox
.Margin = new Padding(0, 3, 3, 3);
434
_listBox
.Name = "listbox";
435
_overArchingTableLayoutPanel.SetRowSpan(
_listBox
, 2);
484
_overArchingTableLayoutPanel.Controls.Add(
_listBox
, 0, 1);
518
if (!
_listBox
.IsHandleCreated)
523
using Graphics g =
_listBox
.CreateGraphics();
524
int old =
_listBox
.HorizontalExtent;
531
_listBox
.HorizontalExtent = w;
537
foreach (ListItem i in
_listBox
.Items)
546
_listBox
.HorizontalExtent = max;
557
ListItem item = (ListItem)
_listBox
.Items[e.Index];
561
int c =
_listBox
.Items.Count;
564
SizeF sizeW = g.MeasureString(maxC.ToString(CultureInfo.CurrentCulture),
_listBox
.Font);
622
if (width > e.Bounds.Width &&
_listBox
.HorizontalExtent < width)
624
_listBox
.HorizontalExtent = width;
677
object[] items = new object[
_listBox
.Items.Count];
680
items[i] = ((ListItem)
_listBox
.Items[i]).Value;
701
_listBox
.Items.Clear();
747
_listBox
.Items.Clear();
757
_listBox
.Items.Add(new ListItem(_editor, items[i]));
761
if (
_listBox
.Items.Count > 0)
763
_listBox
.SelectedIndex = 0;
801
int index =
_listBox
.SelectedIndex;
808
if (
_listBox
.SelectedItems.Count > 1)
810
List<ListItem> toBeDeleted =
_listBox
.SelectedItems.Cast<ListItem>().ToList();
818
RemoveInternal((ListItem?)
_listBox
.SelectedItem);
821
if (index <
_listBox
.Items.Count)
823
_listBox
.SelectedIndex = index;
825
else if (
_listBox
.Items.Count > 0)
827
_listBox
.SelectedIndex =
_listBox
.Items.Count - 1;
848
int selectedItem =
_listBox
.SelectedIndex;
851
_listBox
.RefreshItem(
_listBox
.SelectedIndex);
861
_listBox
.Invalidate();
864
_propertiesLabel.Text = string.Format(SR.CollectionEditorProperties, GetDisplayText((ListItem?)
_listBox
.SelectedItem));
882
_listBox
.Items.Remove(item);
893
_listBox
.Items.Remove(item);
966
ActiveControl =
_listBox
;
985
int index =
_listBox
.SelectedIndex;
995
int ti =
_listBox
.TopIndex;
996
(
_listBox
.Items[index - 1],
_listBox
.Items[index]) = (
_listBox
.Items[index],
_listBox
.Items[index - 1]);
1000
_listBox
.TopIndex = ti - 1;
1003
_listBox
.ClearSelected();
1004
_listBox
.SelectedIndex = index - 1;
1031
bool editEnabled = (
_listBox
.SelectedItem is not null) && CollectionEditable;
1032
_removeButton.Enabled = editEnabled && AllowRemoveInstance(((ListItem)
_listBox
.SelectedItem!).Value);
1033
_upButton.Enabled = editEnabled &&
_listBox
.Items.Count > 1;
1034
_downButton.Enabled = editEnabled &&
_listBox
.Items.Count > 1;
1038
if (
_listBox
.SelectedItem is not null)
1046
items = [new SelectionWrapper(CollectionType, CollectionItemType,
_listBox
,
_listBox
.SelectedItems)];
1050
items = new object[
_listBox
.SelectedItems.Count];
1053
items[i] = ((ListItem)
_listBox
.SelectedItems[i]!).Value;
1057
int selectedItemCount =
_listBox
.SelectedItems.Count;
1061
_propertiesLabel.Text = string.Format(SR.CollectionEditorProperties, GetDisplayText((ListItem)
_listBox
.SelectedItem));