/// <summary> /// Initialize a new instance of the KryptonListBoxActionList class. /// </summary> /// <param name="owner">Designer that owns this action list instance.</param> public KryptonListBoxActionList(KryptonListBoxDesigner owner) : base(owner.Component) { // Remember the list box instance _listBox = owner.Component as KryptonListBox; // Cache service used to notify when a property has changed _service = (IComponentChangeService)GetService(typeof(IComponentChangeService)); }
public InternalListBox(KryptonListBox kryptonListBox) { SetStyle(ControlStyles.ResizeRedraw, true); _kryptonListBox = kryptonListBox; _mouseIndex = -1; // Create manager and view for drawing the background _drawPanel = new ViewDrawPanel(); _viewManager = new ViewManager(this, _drawPanel); // Set required properties to act as an owner draw list box base.Size = Size.Empty; base.BorderStyle = BorderStyle.None; base.IntegralHeight = false; base.MultiColumn = false; base.DrawMode = DrawMode.OwnerDrawVariable; // We need to create and cache a device context compatible with the display _screenDC = PI.CreateCompatibleDC(IntPtr.Zero); }
protected override Control InitialControl() { KryptonListBox ctl = new KryptonListBox(); ctl.DataSource = DataSource; ctl.DisplayMember = DisplayMember; ctl.ValueMember = ValueMember; return ctl; }