using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Lskj.BsMes.Controls
{
public partial class LabelComboBoxEdit : UserControl
{
///
/// this label控件
///
private DevExpress.XtraEditors.LabelControl _imageLabel;
public DevExpress.XtraEditors.LabelControl ImageLabel
{
get
{
_imageLabel = this.imageLabel;
return _imageLabel;
}
set { _imageLabel = value; }
}
private DevExpress.XtraEditors.ComboBoxEdit _comboBoxEdit;
///
/// this ComboBox控件
///
public DevExpress.XtraEditors.ComboBoxEdit ComboBoxEdit
{
get
{
_comboBoxEdit = this.comboBoxEdit;
return _comboBoxEdit;
}
set { _comboBoxEdit = value; }
}
public LabelComboBoxEdit()
{
InitializeComponent();
this.Load += new EventHandler(OnLableComboBoxEdit_Load);
}
///
/// 初始化
///
///
///
private void OnLableComboBoxEdit_Load(object sender, EventArgs e)
{
this.imageLabel.Width = this.Height;
this.comboBoxEdit.BackColor = this.BackColor;
this.comboBoxEdit.Properties.AppearanceDropDown.Font = this.comboBoxEdit.Properties.Appearance.Font;
this.comboBoxEdit.Properties.ShowDropDown = DevExpress.XtraEditors.Controls.ShowDropDown.SingleClick;
this.comboBoxEdit.Click += new EventHandler(OnComboBoxEdit_Click);
this.comboBoxEdit.Properties.ImmediatePopup = true;
this.comboBoxEdit.Properties.Buttons.Clear();
}
private void OnComboBoxEdit_Click(object sender, EventArgs e)
{
DevExpress.XtraEditors.ComboBoxEdit comboBoxEdit = (DevExpress.XtraEditors.ComboBoxEdit)sender;
comboBoxEdit.ShowPopup();
}
}
}