Subject Re: TIB_Grid column alignment
Author Andrei Luís
I found the "problem". I'm using onDrawCell on this grid, to color the lines according to the value of one specific field. I'm using this:

if dm.qrFinanceiro.Active then
      begin

         with (Sender as TIB_Grid) do
           begin
              if (dm.qrFinanceiro.BufferFieldByName('tipo').AsString='PAGAR') then
                 Canvas.Font.Color := clRed
              else
                 Canvas.Font.Color := clBlack;
               DefaultDrawCell(acol,arow,rect,state,GetCellDisplayText(acol,arow), taLeftJustify);
           end;
      end;


That taLeftJustify is my "vilain". So, how can I identify what field is been drawing, then I can change that taLeftJustify accordingly?

Thanks in advance
Andrei


Em seg, 12 de ago de 2019 às 17:12, Andrei Luís <compuvale.software@...> escreveu:
I'm experiencing a strange behavior here. I had set TIB_Query->Field properties->Alignment to right for some numeric fields. In design mode, the alignment is correct, but in runtime, the columns are left aligned!

I'm not changing the alignment in runtime, any clue what is happening?

Regards,
Andrei