Subject [IBO] FieldsDisplayFormat - user defined function possible?
Author G. Nau
Jason,
yes, a global event, triggert by the associated column to format the
display is what I nrrf.
In my example I need a function to format numbers like:
4.56 -> 4.56
4.00 -> 4
So only numbers with past decimal point numbers should be
formatted with ####0.00, integer numbers with ######0.

In case you think about such a user defined format function on a
column base, it might be wise to implement two similar ones for
editing: pre-editing and post-editing.
This would also allow to store data in a more abstract way and use
this three functions (UDF_display, UDF_beforeEdit, UDF_afterEdit)
to generate user friendlich display and entries.
At the moment this can of course be done on IB_Edit level or an
anchestor of IB_Edit, but doing it once on domain level would be
nice.

I'm not that used to the internals of IBO, that I am able to implement
that myself at the moment.
I can live with the situation as it is now. But having such a display
massage function would straighten things out a little bit.

Regards
Gunther


Am 26 Apr 2005 um 17:42 hat Jason Wharton geschrieben:

>
> Are you talking about some kind of a globalized event that allows you to
> massage the values in a centralized snippet of code?
>
> I don't have anything like that but I think there is potential merit to it.
>
> It would be fairly easy to implement something like this. Perhaps you could
> even get in under the hood and plug it in yourself.
>
> It could be something like an OnInitializeColumn event at the TIB_Connection
> level that is called by the TIB_Column class once it is freshly instantiated
> so that your snippet of code could examine it and customize its settings.
>
> Jason Wharton
>
> >
> > Hi,
> > I'd like to define my own functions in my delphi application
> > to format
> > fields for display. Standard editmask is not sufficient for my needs.
> > Any chance to define that on IB_Connection/domain level?
> > Then automatically all displays in IB_grid, IB_Label, IB_Edit
> > et cetera
> > should show the processed data.
> >
> > TIA
> > Gunther