关于使用DBEDIT的掩码问题
fxxhb 2002-06-22 07:24:32 DBEDIT的掩码很不好用,我看了帮助文件,通过设置一个掩码限制输入(如限制输入是一个一个日期)很难办到再TDBEDIT的帮助上提到可以用TFIELD的子类来限制输入(TFIELD的限制输入的子类很多,可见帮助)
打开dbedit的帮助文件,主页面就提到掩码的使用,如下:
To provide a mask to restrict input and control the display format of the data, use mask-related properties of TField and descendants. Such properties include: TField.::EditMask, TDateTimeField.::DisplayFormat, and TNumericField.::DisplayFormat. Which property needs to be used is predicated on the field type and which TField descendant corresponds to that type.
它说可以使用TFIELD及其子类掩码相关的属性(dbedit中有个field属性),但如何使用tfield子类的属性?,如tdatatimefield是tfield的子类,它有个displayformat属性可以限制输入,我如何把限制应用到DBEDIT上?
注,DBEDIT中的field属性是只读的。