DekGenius.com
[ Team LiB ] Previous Section Next Section

ListControlmarshal by reference, disposable

System.Windows.Forms (system.windows.forms.dll)abstract class

This is the abstract base class for list-like Control objects, such as the ListBox, ComboBox, and derived classes.

It provides the basic template for data binding through the DataSource, DisplayMember, and ValueMember properties. Simple selection is accomplished with the SelectedIndex and SelectedValue members.

The concrete derived classes will extend these basic features to offer more specific functionality.

public abstract class ListControl : Control {
// Protected Constructors
   protected ListControl();
// Public Instance Properties
   public object DataSource{set; get; }
   public string DisplayMember{set; get; }
   public abstract int SelectedIndex{set; get; }
   public object SelectedValue{set; get; }
   public string ValueMember{set; get; }
// Protected Instance Properties
   protected CurrencyManager DataManager{get; }
// Public Instance Methods
   public string GetItemText(object item);
// Protected Instance Methods
   protected object FilterItemOnProperty(object item);
   protected object FilterItemOnProperty(object item, string field);
   protected override bool IsInputKey(Keys keyData);  // overrides Control
   protected override void OnBindingContextChanged(EventArgs e);  // overrides Control
   protected virtual void OnDataSourceChanged(EventArgs e);
   protected virtual void OnDisplayMemberChanged(EventArgs e);
   protected virtual void OnSelectedIndexChanged(EventArgs e);
   protected virtual void OnSelectedValueChanged(EventArgs e);
   protected virtual void OnValueMemberChanged(EventArgs e);
   protected abstract void RefreshItem(int index);
   protected virtual void SetItemCore(int index, object value);
   protected abstract void SetItemsCore(System.Collections.IList items);
// Events
   public event EventHandler DataSourceChanged;
   public event EventHandler DisplayMemberChanged;
   public event EventHandler SelectedValueChanged;
   public event EventHandler ValueMemberChanged;
}

Hierarchy

System.Object System.MarshalByRefObject System.ComponentModel.Component(System.ComponentModel.IComponen, System.IDisposable) Control(IOleContro, IOleObject, IOleInPlaceObject, IOleInPlaceActiveObject, IOleWindow, IViewObject, IViewObject2, IPersist, IPersistStreamInit, IPersistPropertyBag, IPersistStorage, IQuickActivate, System.ComponentModel.ISynchronizeInvoke, IWin32Window) ListControl

Subclasses

ComboBox, ListBox

    [ Team LiB ] Previous Section Next Section