InfDef

Added February 2008

Beginning with A-Shell 1104 of 18 Feb 08, the advanced column option InfDef=xxx opens the door to the ability to specify some variations of XTREE editable cell behaviour using INFLD TYPE codes. Currently this only applies globally for all columns in the tree, and only the following TYPE codes are supported:

Type

Description

e

force non-destructive

)

start cursor at end of field, requires e

||I

Forces overwrite mode during editing (instead of the normal insert mode). You most likely would want to use this feature in conjunction with non-destructive mode (InfDef=||Ie), particularly when FastMax=# is being used. Note that ||I is the INFLD code to force overwrite mode.

D

In conjunction with a date field (cformat D), causes the field to be edited by the standard Windows Date and Time Picker control, rather than by the standard Windows edit control. See "Comments" below and also see Format.

t

In conjunction with a time field (cformat h), causes the field to be edited by the standard Windows Date and Time Picker control, rather than by the standard Windows edit control.

 

For example:

Coldef = "1~8~Date~DE~InfDef=D~~"

You can make the date optional by specifying the "O" (optional) code in your InfDef string, i.e. InfDef=DO. (Note that the InfDef clause is shared by all columns, so this method forces you to treat all editable date and time columns the same way.)

In the above example, since the column width is 8, the format will be set to MM/DD/YY (or DD/MM/YY depending on the LDF). Otherwise the year would be returned in CCYY format.

The other method for activating or configuring the date/time picker control is to specify a Format clause.

Comments

Warning about date picker column width: For Windows Vista and later, the width of a column using INfDef=D will be automatically expanded as needed to fit the Windows date picker control (when a cell in the column is edited). But prior to Vista, this does not happen, and worse, if the column width is not sufficient for the date picker, the editing operation may be confusing at best. To avoid this, you may want to specify a DspMin option sufficient to accommodate the date picker. (You'll have to work out the actual minimum width using some trial and error, and/or err on the conservative side, since it changes according to the date format options specified, resolution, etc.)