Ver Mensaje Individual
  #8  
Antiguo 19-02-2016
jhonalone jhonalone is offline
Miembro
 
Registrado: sep 2007
Ubicación: Madrid
Posts: 547
Reputación: 17
jhonalone Va por buen camino
Gracias Agustín.
En Windows coloreaba las celdas al seleccionarlas de la siguiente manera:
Código Delphi [-]
procedure TPrinci.grdTableroDrawCell(Sender: TObject; ACol, ARow: Integer;
  Rect: TRect; State: TGridDrawState);
  var Tablero:TTablero;
begin        // beep;
    StringGridToTablero(Tablero);
    ColTableroActual:=ACol;
    RowTableroActual:=ARow;
  with grdTablero, grdTablero.Canvas do
  begin
    if  CeldaSeleccionada {and ((FilAnt=FilAct) or (ColAnt=ColAct)) }then
    begin
    Brush.Color:= clYellow;   // FilAnt:=ARow; ColAnt:=ACol;
    CeldaSeleccionada := False;
    end
    else
    if Odd((ACol div 3) + (ARow div 3)) then
      Brush.Color:= clAqua
    else
      Brush.Color:= clWhite;

    if TableroGenerado[ACol, ARow] > 0 then
      Font.Color:= clRed
    else begin
         if (TableroAyudado[ACol, ARow]=1) and
            (Tablero[ACol, ARow]=TableroResuelto[ACol,ARow]) //Es celda ayudada
         then Font.Color:= clBlue
         else Font.Color:= clBlack;  
         end;
      //beep;  sleep(3000);
    ExtTextOut(Handle,
      (Rect.Left + Rect.Right - TextWidth(Cells[ACol,ARow])) div 2,
      (Rect.Top + Rect.Bottom - TextHeight(Cells[ACol,ARow])) div 2,
      ETO_CLIPPED  or ETO_OPAQUE  , @Rect, PChar(Cells[ACol,ARow]),
      Length(Cells[ACol,ARow]),nil);
  end;  // With
LMDStatusBar1.Panels[0].Text:='Columna = '+IntToStr(GrdTablero.Col+1)+'  /  Fila = '+IntToStr(GrdTablero.Row+1);
end;

Pero ahora en DX no sé como voy a hacerlo, pues unas propiedades del TStgringGrid las han cambiado de nombre, otras las han eliminado y hay otras nuevas.
Seguiré peleando.
Gracias por todo.
Saludos.
Responder Con Cita