Ver Mensaje Individual
  #1  
Antiguo 08-03-2023
giantonti1801 giantonti1801 is offline
Miembro
 
Registrado: oct 2022
Posts: 143
Reputación: 2
giantonti1801 Va por buen camino
pintar linea en grid segun condicion

amigo tengo 2 dias dandole vuenta a como pintar una linea dentro del stringrid segun su condicion pero aun no lo logro.
mi stringrid se alimenta de una base de dato y lo que quiero lograr ejemplo: Si el valor del campo es igual a 'Pendiente' entonces que me pinte la linea, me cambie el color de la fuente y me coloque el fuente en negrita pero a pezar de mi consulta e investigaciones aun no lo logro. le envio codigo con lo que lo estoy intentando hacer en este momento pero nada que funciona.
Código Delphi [-]
procedure TForm1.StringGrid1DrawColumnBackground(Sender: TObject;
  const Canvas: TCanvas; const Column: TColumn; const Bounds: TRectF;
  const Row: Integer; const Value: TValue; const State: TGridDrawStates);
begin
with stringGrid1 do
//  with canvas do
       //begin
       if UniQueryFICPACESTATUSCONSULTA.AsString = 'PENDIENTE' then
       //if ADOQuery1EST.value = 'DIRIJASE A CAJA'  then
       //else if ADOQuery1EST.value = 'Atendiendo' then
       begin
       stringGrid1.TextSettings.FontColor := clGray;
       stringGrid1.TextSettings.Font.Size  := 18;
       //TFontStyle.fsBold
       //stringGrid1.TextSettings.Font.Style.  :=  TFontStyle.fsBold;
       //stringGrid1.TextSettings.Font.Style.  :=  TFontStyle.fsBold;
       //stringGrid1.DefaultDrawing.(Fill) .Color := clWebGreenYellow;
       //stringGrid1.DefaultDrawColumnCell(rect,datacol, column, State);
       end;

  end;
Responder Con Cita