Hola, ya había intentado trabajar de esta forma pero tengo un objeto StringGrid dinámico y cuando le asigno el evento produce un error en tiempo de compilacionquí hay parte del código que estoy utilizando
TStringGrid* sg = new TStringGrid(Form1);
sg->Parent=sb; //sb es un SrollBox
sg->Align=alLeft;
sg->FixedRows=1;
sg->FixedCols=0;
sg->ColCount=9;
sg->RowCount=2;
sg->Width=500;
//ocurre un problema en tiempo de compilac ión
sg->OnDrawCell=DrawCell;
[C++ Error] Unit1.cpp(1038): E2034 Cannot convert 'void (_fastcall * (_closure )(TObject
*,int,int,TRect &,TGridDrawState))(TObject *,int,int,TRect &,TGridDrawState)' to 'void
(_fastcall * (_closure )(TObject *,int,int,const TRect &,TGridDrawState))(TObject
*,int,int,const TRect &,TGridDrawState)'.
si me puedes ayudar te lo agradezco de antemano