Subject Re: [IBO] TIB_GRID, OnGetCellProps and BufferFields
Author Helen Borrie
At 10:03 AM 25/05/2004 +0000, you wrote:
>Hello Helen
>
>Thanks for your reply.
>
>In the onGetCellProps event handler I am not interested in the widths
>of columns, I should have made that clear. I use the column widths
>only in the form create procedure and the form close procedure,
>allowing a users prior grid settings to have effect.
>
>Each row in the grid represents an event which may be active or
>inactive. In a particular call by the TIB_Grid class to the event
>handler I am interested in a setting "is the current row an active
>event?", and I set the font and background colors by user preference.
>
>In a particular call to the event handler for a particular row and
>column, the values
>myQuery.FieldByName(myBooleanField)asBoolean and
>myQuery.BufferFields.Columns[MyFieldIndex].AsBoolean
>are usually not the values for the row for which the event handler is
>called. Painting colors using these values paint all rows the same.
>
>Only when I use
>myQuery.BufferFieldsByName(myBooleanField).AsBoolean
>do I get good results, and then the first (FixedDataCols+1) values
>are the values for the previous row, which is my problem.
>
>I have started looking in the TIB_GRID, TIB_COMPONENTS.PAS and
>Borland code but am swamped by unfamiliar details at present.

To be honest, I'm lost about what you really intend. Are you cruising
around the buffer and trying to launch grid events (paint instructions)
from there affecting the corresponding dataset buffer rows? Have you looked
at Gridlinks?

Helen