ab56a9bcf7
SVN-Revision: r240
67 lines
2.2 KiB
C#
67 lines
2.2 KiB
C#
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
|
|
{
|
|
/// <summary>
|
|
/// this label控件
|
|
/// </summary>
|
|
private DevExpress.XtraEditors.LabelControl _imageLabel;
|
|
public DevExpress.XtraEditors.LabelControl ImageLabel
|
|
{
|
|
get
|
|
{
|
|
_imageLabel = this.imageLabel;
|
|
return _imageLabel;
|
|
}
|
|
set { _imageLabel = value; }
|
|
}
|
|
private DevExpress.XtraEditors.ComboBoxEdit _comboBoxEdit;
|
|
/// <summary>
|
|
/// this ComboBox控件
|
|
/// </summary>
|
|
public DevExpress.XtraEditors.ComboBoxEdit ComboBoxEdit
|
|
{
|
|
get
|
|
{
|
|
_comboBoxEdit = this.comboBoxEdit;
|
|
return _comboBoxEdit;
|
|
}
|
|
set { _comboBoxEdit = value; }
|
|
}
|
|
public LabelComboBoxEdit()
|
|
{
|
|
InitializeComponent();
|
|
this.Load += new EventHandler(OnLableComboBoxEdit_Load);
|
|
}
|
|
/// <summary>
|
|
/// 初始化
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
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();
|
|
}
|
|
}
|
|
}
|