internal void ApplyProperties(ControlProperties properties) { this.AutoEllipsis = properties.AutoEllipsis; this.AutoSize = properties.AutoSize; this.FlatStyle = properties.FlatStyle; this.ForeColor = properties.ForeColor; this.RightToLeft = properties.RightToLeft; this.TextAlign = properties.TextAlign; }
public LxzhComboBox() { InitializeControlStyle(); InitializeComponent(); ctrlProperties = new ControlProperties(); ctrlProperties.PropertyChanged += new EventHandler(controlProperties_PropertyChanged); dropDownControl = new LxzhListControl(this); this.ForeColor = dropDownControl.ForeColor; dropDown = new Popup(dropDownControl); dropDown.PopupHide += new EventHandler(dropDown_PopupHide); dropDown.Resizable = true; scrollBar = dropDownControl.ScrollBar; scrollBar.Scroll += new EventHandler(scrollBar_Scroll); scrollBar.ValueChanged += new EventHandler(scrollBar_ValueChanged); penEnter = new Pen(new SolidBrush(System.Drawing.SystemColors.Highlight), 1.4F); penLeave = new Pen(new SolidBrush(Color.White), 1.4F); items = new List <string>(); base.Text = string.Empty; }