defaultExt
Type: String
Default Value: Null
The defaultExt property of the CMDFileOpen class contains the default file name extension for the common File Open dialog.
Use this property to specify a default file name extension; for example, .txt or .doc.
When you define a value for the defaultExt property, you must also define the filter property value. If the specified defaultExt property value does not exist in the filter string, it defaults to All Files|*.*.
The following is an example of the defaultExt and filter properties.
vars trCMD : CMDFileOpen; begin create trCMD transient; trCMD.filter := "Text (*.txt)|*.txt|Pictures(*.bmp;*.ico)|*.bmp;*.ico|All Files|*.*"; trCMD.defaultExt := ".txt"; if trCMD.open = 0 then // do some processing here endif; epilog delete trCMD; end;