[Lazarus] TStringGrid: ColCount vs Columns.Count

Jesus Reyes jesusrmx at yahoo.com.mx
Wed Dec 10 06:01:45 CET 2008




--- El mar 9-dic-08, Alexander Klenin <klenin at gmail.com> escribió:

> >> > what about fixed columns? should indices also
> count them?
> >> Of course. Does not they now?
> > no they don't.
> 
> Hm. So currently it is impossible to have, say,
> right-aligned text in
> fixed column?
> I'd say it is a bug.
> 

Using custom columns it is impossible because they were introduced by "back porting" dbgrid columns to standard grid, and you don't have a custom column for indicator column. So in my view it's not a bug but a feature :)

Of course you can have a right aligned fixed column, using OnPrepareCanvas just need to check when a fixed col is being "prepared" and set canvas.textstyle to the alignment you want. Yes it's not the same as with custom columns but at least it's not impossible :)

Jesus Reyes A.


      ¡Todo sobre Amor y Sexo!
La guía completa para tu vida en Mujer de Hoy.                       
http://mx.mujer.yahoo.com/




More information about the Lazarus mailing list