Ver Mensaje Individual
  #2  
Antiguo 05-07-2008
[coso] coso is offline
Miembro Premium
 
Registrado: may 2008
Ubicación: Girona
Posts: 1.678
Reputación: 0
coso Va por buen camino
hola. Debes usar el evento OnDrawColumnCell o el OnCellDraw

Código Delphi [-]
procedure T_lcli.DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect;
  DataCol: Integer; Column: TColumn; State: TGridDrawState);
begin
        if (gdSelected in State) and (lowercase(Column.FieldName) = 'nombre')    then
        begin
               BitBtn1.Height := Rect.Bottom - Rect.Top;
               BitBtn1.Width  := BitBtn1.Height;

               BitBtn1.Left := Rect.Right - BitBtn1.Height;
               BitBtn1.Top  := Rect.Top;
        end;
end;

PD: este te lo pone en solo una celda. Necesitaras tantos bitbtns como celdas donde lo quieras, bien creados en tiempo de diseño, bien en tiempo de ejecucion

saludos

Última edición por coso fecha: 05-07-2008 a las 10:51:50.
Responder Con Cita