Subject Re: [IBO] Mask Edit Problem
Author Geoff Worboys
> I was using the TDBEdit fields and am now using TIB_EditEnh.
<...>
> Edit_Field->Field->EditMask = "!99999-9999;0";

The "!" character in the standard vcl mask editor is supposed to mean
that optional characters are represented by leading blanks. This
never seemed to work or mean anything with standard masks so with the
MaskEnh processing I interpretted this character slightly
differently - in a manner which can give the effect as described in
the online help. I make this character mean that you want
right-justified data entry - well sort of, see the TMaskEnhString
topic in the IBO online help for more details.


> It use to set the "-" in the field and hold the place while
> the user entered the numbers it would skip over the "-" field.
> I can not get this same effect with the TIB_EditEnh. It
> allows me to enter the correct number of numbers and that
> they are numbers put the "-" only shows when I first load the
> form. I even used the sample edit mask with the help provided,
> but could not get it to work. I know that this is probably
> simple.

I should first check that you know how masks are defined to IB native
controls. There is no EditMask property on the TIB_* control itself
(or shouldnt be), instead you put an entry in the dataset or
connection FieldsEditMask string list property...

FieldName=!99999-9999;0


If you want to experiment with different masks, drop TEditEnh onto a
form (the non IBO-aware version) and click on the EditMask property
editor button to get a demo dialog - not sure if you were referring to
this or the samples in the online help. When using the demo dialog
remember to set the mask mode appropriately before setting a mask
string. The demo dialog provides a control that contains the mask
string required for the FieldsEditMask property, so you can copy/paste
the results when you are happy. (Since MaskEnh supports different
modes it applies prefix to the mask string to indicate the mode when
used in FieldsEditMask properties. If no prefix supplied it assumes
standard - mostly VCL compatible - mask processing.)

By default, IBO controls disable the mask in search mode. You can
change this behaviour with the SearchWithMask property. Also, IBO
controls generally only use the mask when the control is focused, when
not focused the text is formatted by the IBO column definition and
just displayed - which can change the appearance (for the better IMO)
of the control contents, and prevents undesireable exceptions.


As an additional note. If you intend to use enhanced mask processing,
and you want to edit on an IB_Grid you must drop a TIB_EditEnh control
onto the grid and associated it with the required column.


Not sure if any of this helps.

Geoff Worboys
Telesis Computing