Formatacao DBGrid no DrawColumnCell
Tenho um dbgrid com as colunas formatadas em tempo de projeto, e qdo usei o evento onDrawColumnCell do DBGrid, em execução perde-se o alinhamento das colunas. Como faço para manter a formatação, ou reformatar durante a execução?
Tenho outra questao tb: uso o Fortes Report, no mesmo formulario. O FR tem um tipo TRLAlignment, e o que acontece é que qdo tento usar alinhamento de algum componente o compilador acusa erro de tipos inconsistentes.
Ex:
Label1.Alignment := taCenter;
O compilador entende o ´taCenter´ como sendo da classe TRLAlignment e não da TAlignment!
TAlignment = (taLeftJustify, taRightJustify, taCenter);
TRLAlignment = (taLeftJustify, taRightJustify, taCenter, taJustify);
Agora estou usando assim e funciona, mas é a única saída?
Label1.Alignment := TAlignment(0); // esquerda
Label1.Alignment := TAlignment(1); // direita
Label1.Alignment := TAlignment(2); // centro
Tenho outra questao tb: uso o Fortes Report, no mesmo formulario. O FR tem um tipo TRLAlignment, e o que acontece é que qdo tento usar alinhamento de algum componente o compilador acusa erro de tipos inconsistentes.
Ex:
Label1.Alignment := taCenter;
O compilador entende o ´taCenter´ como sendo da classe TRLAlignment e não da TAlignment!
TAlignment = (taLeftJustify, taRightJustify, taCenter);
TRLAlignment = (taLeftJustify, taRightJustify, taCenter, taJustify);
Agora estou usando assim e funciona, mas é a única saída?
Label1.Alignment := TAlignment(0); // esquerda
Label1.Alignment := TAlignment(1); // direita
Label1.Alignment := TAlignment(2); // centro
Drf
Curtidas 0