Ver Mensaje Individual
  #1  
Antiguo 28-06-2011
Avatar de RebeccaGL
RebeccaGL RebeccaGL is offline
Miembro
 
Registrado: ene 2008
Posts: 199
Reputación: 17
RebeccaGL Va por buen camino
De DBGrid a QuantunGrid

Como podira pasar este codigo a una QuantumGrid.


Código Delphi [-]
 
procedure TForm_BeEMPPRJ.DBGrid_GANPERDrawColumnCell(Sender: TObject;
  const Rect: TRect; DataCol: Integer; Column: TColumn;
  State: TGridDrawState);
begin
  if (Column.Field = Query_GANPER.FieldByName('Concepto')) and
     (copy(Query_GANPER.FieldByName('FIND_Concepto').AsString,
      pos('_', Query_GANPER.FieldByName('FIND_Concepto').AsString) + 1, 2) = 'TI') or
     (Column.Field = Query_GANPER.FieldByName('Concepto')) and
     (copy(Query_GANPER.FieldByName('Concepto').AsString, 1, 1) = '*') then
  begin
    DBGrid_GANPER.Canvas.Font.Style := [fsBold];
    DBGrid_GANPER.Canvas.Font.Color := clBlack;
    if (gdSelected in State) and
       (DBGrid_GANPER.Focused) then
      DBGrid_GANPER.Canvas.Font.Color := clWhite;
  end;
  // Continue
  DBGrid_GANPER.DefaultDrawColumnCell(Rect, DataCol, Column, State);
end;
Responder Con Cita