[Lazarus] How to get rid of text in (0,0) in StringGrid?

Jesus Reyes jesusrmx at yahoo.com.mx
Thu Feb 4 23:04:53 CET 2010



--- El jue 4-feb-10, Graeme Geldenhuys <graemeg.lists at gmail.com> escribió:

> Now that goFixedRowNumbering is fixed, what about the other
> problem?
> 
> "So it seems Cell() and Columns() are inconsistent in
> meaning (column 0 not
> being the same thing)"
> 
> I haven't double checked this after the goFixedRowNumbering
> fix, but I
> still think this is a separate issue and not affected by
> goFixedRowNumbering usage. Cells[0,0]  doesn't seem to
> be equal to
> Columns[0].Title.Caption - if you have one fixed row and
> one fixed
> column. In that case Column[0].Title.Caption is actually
> referring to
> Cell[1,0] (note aCol = 1 here) - this is inconsistent and
> weird.
> 
> Is this done by design?
>

Is it an inconsistency?, yes and not. 

One would expect that columns list correspond to physically grids columns but this is not true. This is not true for a dbgrid where underlaying grid cell 0,0 do not correspond to grid.columns[0].title.caption in case there is an indicator column (I might be wrong and hence I may have implemented this feature wrong :(). 

As the stringgrid columns support was based on how the columns works on dbgrid, it remains consistent that list column do not always correspond to physical grid columns. If a user that does not know this start coding and find that the caption on first custom column is not drawn on first grid column it does looks like an inconsistency, I agree too. So yes and not. 

Btw, the column's caption should take precedence when drawing on corresponding grid cell.

This is not easy to fix, and also without causing headaches and unconformity by developers that currently have their applications running fine. So because of this and because I think this is not a major show stop, really I'm tempted to just document the fact and let the things like they are. 

There is(are) already bug report(s) about this issue, I have not resolved them because it's still not a decided thing. In any case I don't expect to work on this before 1.0.

Jesus Reyes A.

 
> 
> -- 
> Regards,
>   - Graeme -
> 

Jesus Reyes A.


      Encuentra las mejores recetas en Yahoo! Cocina.                       
http://mx.mujer.yahoo.com/cocina/




More information about the Lazarus mailing list