[Lazarus] TStringGrid: ColCount vs Columns.Count

Jesus Reyes jesusrmx at yahoo.com.mx
Tue Dec 9 21:32:29 CET 2008




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

> De:: Alexander Klenin <klenin at gmail.com>
> Asunto: Re: [Lazarus] TStringGrid: ColCount vs Columns.Count
> A: jesusrmx at yahoo.com.mx
> Fecha: martes, 9 diciembre, 2008, 1:10 pm
> On Wed, Dec 10, 2008 at 03:41, Jesus Reyes
> <jesusrmx at yahoo.com.mx> wrote:
> > --- El mar 9-dic-08, Alexander Klenin
> <klenin at gmail.com> escribió:
> >> It is counter intuitive to me that the above code
> needs additional
> >> call to SGrid.Columns.Add
> >
> > This seems to suggest that grid should always use
> custom columns, but no all applications require them.
> Sure, but what is the downside of always having them?
> Slightly
> increased memory consumption?
> If memory truly is a problem, it can be mitigated by
> creating custom
> columns lazily (i.e. on demand).

[snip]

> >
> > what about fixed columns? should indices also count
> them?
> Of course. Does not they now?
> 

no they don't.

I think you wasn't too clear on what is what you wanted, anyway I think it has nothing wrong with having custom columns even for fixed cols, just it was not the initial goal.

> >if there are two fixed columns what column should
> Sgrid.Columns[1] refer to?.
> To the second of them.
> 
> >> However, this is not backwards-compatible... so,
> as a compromise,
> >> perhaps Columns.Add should increase ColCount to
> keep both in sync?
> >
> > This can be done, but I don't think all problems
> of intutiveness(?) will disappear for all cases.
> What problems do you think will be left unsolved?
> 

Many if you think in the current situation and just changing SetColCount to get custom columns and columns on sync, but now I understand what you want, it would be nice indeed.

As I think it's not just changing a couple of lines, I would like to know what other persons think about this feature, would it be welcomed no not? if there is enough demand we can do it.

> -- 
> Alexander S. Klenin
> Insight Experts Ltd.

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