Hi, Boki:
This is a weird one!
I have a unit which creates grids using stored grid properties in a database. I have been converting code, properties and events from NextGrid 5 to NG6. I am using essentially the same code as NG5 and only making changes where the properties and events change in name or functionality. I have kept all the NG5 code and simply use a new NG6 grid which I can switch between NG6 and NG5 by a menu selection then having the user reload the grid in the alternate NextGrid 5 or 6. I will keep this fail safe menu item until convinced that the NG6 grids are equally functional as the NG5 grids. Right now, the NG5 grids do not display this behavior.
What I am seeing is that on bringing up any grid during run time, the text font of the various columns will change from the default, clBlack, to almost any color. All text in the grid will be assigned the same non-black color. On closing the grid and reopening/recreating it, the font.color may or may not be the same, often it will go back to the default color, clBlack, but on another attempt to reopen the grid the color may change again.
If I continue to open various grids, a new color may be assigned or the default black color may be used. No apparent pattern.
As the grid is created I have a procedure, SetColProps6, which assigns the font.color based on what is stored in the database. I tried setting the font.color explicitly to clBlack with no change to this random color assignment.
I am using the newer (compared to NG5) event: NxTextColumn6StyleText. But if I simply exit out of this event without running the code, still I am getting the random color assignment.
Where this becomes a problem is when the color is something like clYellow which is very difficult to read. Thankfully, I have not seen it become clWhite yet.
At this point I am completely at a loss as to where this happening. Can you either suggest where this might be happening or if you can or have observed this, suggest a fix?
Thank you,
Chuck












