Subject Re: [IBO] Re: DisplayFormat Problem
Author Geoff Worboys
> I guess the native ibo components don't work that way and I need an
> editmask. When the float field is displayed, I want to show (for
> example) 4 decimal positions. When the user tabs into the field in
> edit mode I want only 4 decimal positions to display, but the user
> can type in more. When the user tabs to the next field, I want 4
> decimal positions to display again. I can't come up with the proper
> editmask That's my problem. I've tried '0.0000' and '#.###' and only
> get weird results. I can't find any samples of editmasks. Thanks
> again.

You want the user to be able to type in more than 4 decimal places,
but do you want that additional information to be relevant? (That
is; do you want that additional information stored?) I must say that
I do not approve of having more that 4 places stored but only showing
4 places to the user.

You keep mentioning "float". In my experience the float data type is
next to useless. If I need floating point I always using double, even
when the number of digits required is only 4 or 5 (such as percentages
etc). float only supports up to 7 digits of significance and you
quickly run into round issues that show up even before that number of
digits. (The "significance" is still OK because explicit rounding
should still give you the desired result, but from the user/visual
side of things it tends to be very ugly.)

You may find the ib_currency control gives you better management of
this sort of input. Alternatively you may find the enhanced mask
processing of my enhanced component collection useful - but that
will partly depend on your requirements. Contact me privately I
can provide you with access to evaluate whether Enh can help.


--
Geoff Worboys
Telesis Computing