#1 2014-03-16 20:30:17

tech
Member
Registered: 2014-01-13
Posts: 107

TSQLTableToGrid Fields width and Align

Hi,

I want to set the column widths and I can not understand how does this syntax:

fieldWidth : 'IddId'

I also want to align double and currency fields to the right with an accuracy of 2.

Thnx,

Offline

#2 2014-03-17 18:12:04

tech
Member
Registered: 2014-01-13
Posts: 107

Re: TSQLTableToGrid Fields width and Align

Well, I begin to understand the philosophy of fieldWidth.
We must have the same number of letters that fields if we want it to work.
The width of the field is calculated according to the ord value of the letter, and the alignment is Left if uppercase and center if lowercase, but nothing for the right one.
I think it is better to have another parameter FieldAlign: 'lrc' with l: Left, r: Rigth and c: Center.
In the meantime I replaced the alCenter by alRight in SetFieldLengthMean because I do not need it.
What do you think AB ?

I solved the precision display by adding another RawUTF8 field that contains the correct string to display.

Thnx,

Offline

Board footer

Powered by FluxBB