MonoDevelop.Components.DropDownBoxListWindow.SelectItem C# (CSharp) Méthode

SelectItem() public méthode

public SelectItem ( object item ) : void
item object
Résultat void
		public void SelectItem (object item)
		{
			for (int i = 0; i < DataProvider.IconCount; i++) {
				if (DataProvider.GetTag (i) == item) {
					list.Selection = i;
					vScrollbar.Vadjustment.Value = Math.Max (0, i * list.RowHeight - vScrollbar.Vadjustment.PageSize / 2);
					break;
				}
			}
		}

Usage Example

        public Gtk.Widget CreatePathWidget(int index)
        {
            PathEntry[] path = CurrentPath;
            if (null == path || 0 > index || path.Length <= index)
            {
                return null;
            }

            object tag = path[index].Tag;
            DropDownBoxListWindow.IListDataProvider provider = null;
            if (!((tag is D_Parser.Dom.IBlockNode) || (tag is DEnumValue) || (tag is NoSelectionCustomNode)))
            {
                return null;
            }
            provider = new EditorPathbarProvider(Document, tag);

            var window = new DropDownBoxListWindow(provider);
            window.SelectItem(tag);
            return window;
        }
All Usage Examples Of MonoDevelop.Components.DropDownBoxListWindow::SelectItem