//设置textEdit_RasterDataFile为可以编辑修改 textEdit_RasterDataFile.Properties.ReadOnly = false; textEdit_RasterDataFile.Text = OpenFileDialog_RasterDataFile.FileName; //设置textEdit_RasterDataFile为只读不能编辑修改 textEdit_RasterDataFile.Properties.ReadOnly = true;
4、用于接收数值的textEdit只能输入数字
使用textEdit的正则化功能:
//只允许文本框输入数字 textEdit_InitialVIS.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.RegEx; textEdit_InitialVIS.Properties.Mask.UseMaskAsDisplayFormat = true; textEdit_InitialVIS.Properties.Mask.EditMask = "([0-9]{1,}[.][0-9]*)";