[英]Set DisplayFormat and EditFormat for DevExpress TextEdit
我有一個具有以下屬性的DevExpress TextEdit:
this.txtPrice.EditValue = "";
this.txtPrice.Location = new System.Drawing.Point(677, 73);
this.txtPrice.Name = "txtPrice";
this.txtPrice.Properties.Appearance.Font = new System.Drawing.Font("B Mitra", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(178)));
this.txtPrice.Properties.Appearance.Options.UseFont = true;
this.txtPrice.Properties.DisplayFormat.FormatString = "f0";
this.txtPrice.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric;
this.txtPrice.Properties.Mask.BeepOnError = true;
this.txtPrice.Properties.Mask.EditMask = "999999999999";
this.txtPrice.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.Simple;
this.txtPrice.Size = new System.Drawing.Size(124, 24);
this.txtPrice.TabIndex = 4;
this.txtPrice.TextChanged += new System.EventHandler(this.txtPayed_TextChanged);
我想為其設置顯示和編輯格式(僅隔一千個分隔符),我已經測試了“ N0”和“ f0”,並將formatType設置為數值,但是什么也沒發生。 請告訴我如何應用千位分隔符。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.