DBAdvGrid First Column Font Size

Good afternoon to all,

i have a little problem with the first column font size.

Seem that the first colums has setted tahoma size 8, always.



I tried to drop into a blank form a DBAdvGrid + TDataSet (linked to any table); changing the font size to tahoma 10 (or any) into font, fixed font and activecellfont (last two are bold).

The first column has always tahoma 8.



Even fixed font has a little problem.

If j have the first grid's row as fixed row, why the fixed font does not working ? and in order to have the colums header in bold j need to set it via FontStyles[1,0]:=[fsBold].

If the first row is fixed and all the columns in that row are title, due the fact that the property fixedfont exist, all the cells int fixed row must be in the fixed font.

The fixed font works well with the fixed columns, if i set column 2 as fixed, all cells in that column use fixed font.



Excuse me if i made some confusion.



Thank's for your attention



Daniele



When the first column is a fixed column (i.e. default grid.FixedCols = 1), then the font is controlled by grid.FixedFont.
I retested this here with grid.FixedFont.Name := 'Courier New', grid.FixdFont.Size := 16 and I cannot see an issue, the first column font is the Courier New at 16pt.
Do you use the latest version and if so, what is different in your case?

Hi Bruno,

i still have the problem.



Try this to reproduce the problem (the only third part components are the table and the databse ):



1) Drop a DBAdvGrid, TDataSet, a TTable and TDataBase component into a form.

2) Connect TTable and TDataBase to an exist databse, assign the tablename, link the dataset to a table and the advgrid to the dataset.

3) in the dbadvgrid cheange in designtime the Activecellfont, Fixedfont and font to any font type

4) run



In my case the fonts don't change, even if i cancel the dbadvgrid from the form and i insert a new one without change anything; Same result.



But, if i do some changing in runtime (for example the number of columns and so on) something as follow in the oncreate event (or in separate procedure called in the oncreate event)



DBG1.Clear;

DBG1.ColCount:=4;

DBG1.Cells[1,0]:='Offerta';

DBG1.Columns[1].HeaderAlignment:=taCenter;

DBG1.FontStyles[1,0]:=[fsBold];

DBG1.FontSizes[1,0]:=10;

DBG1.Columns[1].FieldName:='NomeOfferta';



DBG1.Cells[2,0]:='Data Inizio';

DBG1.Columns[2].HeaderAlignment:=taCenter;

DBG1.FontStyles[2,0]:=[fsBold];

DBG1.FontSizes[2,0]:=10;

DBG1.Columns[2].FieldName:='InizioOfferta';



DBG1.Cells[3,0]:='Data Fine';

DBG1.Columns[3].HeaderAlignment:=taCenter;

DBG1.FontStyles[3,0]:=[fsBold];

DBG1.FontSizes[3,0]:=10;

DBG1.Columns[3].FieldName:='FineOfferta';



The font size and style are exactly those setted, with the first column exception that remain in tahoma 8 no style.



With the AdvStringGrid (no db) all working well.



Thank's for your interest.



Have a nice day



Daniele



Try to use

grid.Columns[columnindex].HeaderFont.Style := [fsBold];
grid.Columns[columnindex].HeaderFont.Size := 10;