Beispiel #1
0
            public DropDown(KAbstractComboBox owner, Control control)
            {
                this._owner = owner;

                KVisualStyle <COMBOBOXPARTS, State> .Part style = owner._style[COMBOBOXPARTS.CP_BORDER];
                Renderer = new DropDownRenderer(style);
                using (Graphics graphics = CreateGraphics())
                {
                    Padding = style?.GetMargins(graphics, State.Pressed) ?? new Padding();
                }

                Margin            = new Padding(0);
                AutoSize          = true;
                DropShadowEnabled = false;
                AutoClose         = false;

                // Add a host for the control
                ToolStripControlHost host = new ToolStripControlHost(control);

                host.Padding  = new Padding(0);
                host.Margin   = new Padding(0);
                host.AutoSize = true;
                Items.Add(host);
            }
 public Part(KVisualStyle <PartTypeId, StateTypeId> style, PartTypeId id)
 {
     this._style  = style;
     this._partId = id;
 }
Beispiel #3
0
 public DropDownRenderer(KVisualStyle <COMBOBOXPARTS, State> .Part style)
 {
     this._style = style;
 }