PeterDelphin
asked on
How to get the color of the clicked cell?
I had this question after viewing TAdvStringGrid: Ā Cell's Background and Font color handling.
In a TAdvStringGrid, in grid.OnGetCellColor event-handler, I've set each cell of the fixed column to a different color:
Now, when I click on a cell of this fixed column, in the grid.OnClickCell event-handler, I want to get the color of the clicked cell.
How can I do this?
I have tried:
But it does not work. I always get the same color: RGB(255, 255, 255).
In a TAdvStringGrid, in grid.OnGetCellColor event-handler, I've set each cell of the fixed column to a different color:
ABrush.Color := GetMyCustomColor;
Now, when I click on a cell of this fixed column, in the grid.OnClickCell event-handler, I want to get the color of the clicked cell.
How can I do this?
I have tried:
grid.GetCellProperties(ACol, ARow).BrushColor)
But it does not work. I always get the same color: RGB(255, 255, 255).
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER