SVN r1230
SVN-Revision: r1230
This commit is contained in:
@@ -212,4 +212,35 @@ namespace Lskj.Control
|
||||
if (!string.IsNullOrWhiteSpace(formatString))
|
||||
{
|
||||
this.txtEdit.Properties.DisplayFormat.FormatString = this.txtEdit.Properties.EditFormat.FormatString = this.txtEdit.Properties.Mask.EditMask = formatString;
|
||||
this.txtEdit.Properties.DisplayFormat.FormatType = this.txtEdit.Properties.EditFormat.FormatType = DevExpress.Utils.FormatT
|
||||
this.txtEdit.Properties.DisplayFormat.FormatType = this.txtEdit.Properties.EditFormat.FormatType = DevExpress.Utils.FormatType.Custom;
|
||||
}
|
||||
|
||||
this.TextEdit.QueryPopUp += TextEdit_QueryPopUp;
|
||||
|
||||
}
|
||||
|
||||
private void TextEdit_QueryPopUp(object sender, CancelEventArgs e)
|
||||
{
|
||||
// 更改一个不相关的属性来触发更新(字体大小),刷新可以解决下拉框切换到年,月时,控件失去焦点后。再次打开布局错误的问题
|
||||
Font oldFont = TextEdit.Font;
|
||||
TextEdit.Font = new Font(oldFont.Name, oldFont.Size + 1);
|
||||
TextEdit.Font = oldFont; // 还原字体大小
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 背景颜色
|
||||
/// </summary>
|
||||
/// <value>The color of the required label.</value>
|
||||
public override Color BackgroundColor
|
||||
{
|
||||
get
|
||||
{
|
||||
return TextEdit.Properties.Appearance.BackColor;
|
||||
}
|
||||
set
|
||||
{
|
||||
TextEdit.Properties.Appearance.BackColor = value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user