Inheritance: VisualControlBase, IContainedInputControl
        /// <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));
        }
Exemplo n.º 2
1
            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);
            }
Exemplo n.º 3
0
 protected override Control InitialControl()
 {
     KryptonListBox ctl = new KryptonListBox();
     ctl.DataSource = DataSource;
     ctl.DisplayMember = DisplayMember;
     ctl.ValueMember = ValueMember;
     return ctl;
 }