Board index » delphi » StringGrid Col[0] STILL loses text

StringGrid Col[0] STILL loses text

Hello

I thought that I had this fixed, but the problem persists on some
machines.

Col[0] is a FixedCol, and I put the 24 hour clock times in each row,
in the fashion row 5 = 1:00, row 6 = :15, 7 = :30, 8 = :45 etc etc.

On some systems, always using 800 X 600, digits disappear from the
times column, even though the column width is 50, which appears to be
more than adequate.

Col[0] uses DT_RIGHT in the DrawCell event, while the
others use DT_LEFT;  we removed OR WORDBREAK from the alignment
argument, but it hasn't helped all machines.

Any tips would be appreciated.

Regards & TIA

 

Re:StringGrid Col[0] STILL loses text


Hello

I thought that I had this fixed, but the problem persists on some
machines.

Col[0] is a FixedCol, and I put the 24 hour clock times in each row,
in the fashion row 5 = 1:00, row 6 = :15, 7 = :30, 8 = :45 etc etc.

On some systems, always using 800 X 600, digits disappear from the
times column, even though the column width is 50, which appears to be
more than adequate.

Col[0] uses DT_RIGHT in the DrawCell event, while the
others use DT_LEFT;  we removed OR WORDBREAK from the alignment
argument, but it hasn't helped all machines.

Any tips would be appreciated.

Regards & TIA

Re:StringGrid Col[0] STILL loses text


Peter:

This appears at first glance to be simply a matter of getting the
strings to fit, with slight variations in fonts between the machines you
are trying.  It might be interesting to try making the cell width quite
large, and then append a space or two to the *right* end of the time
string before assigning it to the cell.

Graham

Re:StringGrid Col[0] STILL loses text


Quote
> I thought that I had this fixed, but the problem persists on some
> machines.

> Col[0] is a FixedCol, and I put the 24 hour clock times in each row,
> in the fashion row 5 = 1:00, row 6 = :15, 7 = :30, 8 = :45 etc etc.

> On some systems, always using 800 X 600, digits disappear from the
> times column, even though the column width is 50, which appears to be
> more than adequate.
> Col[0] uses DT_RIGHT in the DrawCell event, while the
> others use DT_LEFT;  we removed OR WORDBREAK from the alignment
> argument, but it hasn't helped all machines.

Triple-check the rect you pass to DrawText, it seems to be too wide.

Peter Below (TeamB)  100113.1...@compuserve.com)
No e-mail responses, please, unless explicitly requested!

Other Threads