Page 1 of 2

Numeric Formatting for data aware JQLabelEx

PostPosted: 03 Jan 2015 05:02
by JohnFSklavounos
Hi Guys,

Any ideas on how to format a numeric in a data aware JQLabelEx?

Thanks for any advice!

Best,
John

Re: Numeric Formatting for data aware JQLabelEx

PostPosted: 05 Jan 2015 10:34
by Alexander Bulei
Hi John,

We have added new event for this purpose:

Code: Select all
IWCGJQLabelEx:
- Added: new event OnSetText - trigger on set new next


Available in next beta build.

Thanks.

Best Regards.

Re: Numeric Formatting for data aware JQLabelEx

PostPosted: 05 Jan 2015 17:27
by JohnFSklavounos
Wow, you guys are amazing! Thank you very much. :D

Re: Numeric Formatting for data aware JQLabelEx

PostPosted: 06 Jan 2015 11:07
by Jorge Sousa
Hi John

You must use Field.OnGetText or Field.DisplayFormat for this purpose.

Re: Numeric Formatting for data aware JQLabelEx

PostPosted: 06 Jan 2015 14:16
by JohnFSklavounos
Hi Jorge,

I can't do that in this particular instance, I have the same field displayed in two different tabs but formatted slightly differently. One is full precision and the other is standard currency.

When the beta comes available I will use that.

Thanks!
John

Re: Numeric Formatting for data aware JQLabelEx

PostPosted: 06 Jan 2015 15:26
by Jorge Sousa
Hi

The OnSetText made no sense, I removed.

You must use Field.OnGetText. It's the only way for any data aware control

Re: Numeric Formatting for data aware JQLabelEx

PostPosted: 06 Jan 2015 17:39
by JohnFSklavounos
Hi Jorge,

I do think that it makes sense and is a good feature, I hope you decide to keep it in :). I believe the analogous standard Delphi component is the DBText component. In that component it is available in the form of;

DBText.GetTextBuf(Buffer: PWideChar; BufSize: integer);
DBText.SetTextBuf(Buffer: PWideChar);

For my purposes (and memory / data utilization) it makes better sense that only one data field be tied to multiple labels with different masks. I'd really rather not have the field in my queries more than once just to display one at 6 decimal places and another at 2. Granted, this may not really be a feature that many programmers have asked for but I do think that it can be very useful.

Thanks for listening & I really appreciate all you do and your amazing responsiveness.

All my best,
John

Re: Numeric Formatting for data aware JQLabelEx

PostPosted: 06 Jan 2015 22:30
by Jorge Sousa
Hi

It's a good feature to implement at the Datalink level yes, not for the LabelEx only.

It will take some time, but this way will be useful for any control that uses the DataLink property.

Re: Numeric Formatting for data aware JQLabelEx

PostPosted: 19 Jan 2015 17:15
by Jorge Sousa
Hi

We did this for next release, available for download tomorrow

DataLink:
- Added events OnUpdateControl to modify the behaviour when the controls needs to be updated with the field value and OnUpdateField when the field data needs to be set because of an insertion or edition.

Re: Numeric Formatting for data aware JQLabelEx

PostPosted: 19 Jan 2015 18:43
by JohnFSklavounos
All I can say is WOW! Thanks again for all you do. :D

Best,
John