Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Desarrollo en Delphi para Android
Registrarse FAQ Miembros Calendario Guía de estilo Buscar Temas de Hoy Marcar Foros Como Leídos


 
 
Herramientas Buscar en Tema Desplegado
  #8  
Antiguo 19-02-2016
jhonalone jhonalone is offline
Miembro
 
Registrado: sep 2007
Ubicación: Madrid
Posts: 571
Poder: 19
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
 


Herramientas Buscar en Tema
Buscar en Tema:

Búsqueda Avanzada
Desplegado

Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
TStringGrid, colorear UNA celda. TiammatMX OOP 3 03-09-2012 23:01:49
¿Cómo colorear cada celda de un TStringGrid? Almd Internet 0 19-11-2008 12:38:47
Colorear Celdas De Un Objeto Tcalendar JUANRS Varios 0 29-08-2007 01:17:31
Colorear Celdas De Un Objeto Tcalendar JUANRS OOP 0 28-08-2007 01:28:28
colorear las celdas de un TstringGrid mangel OOP 2 16-12-2003 17:22:47


La franja horaria es GMT +2. Ahora son las 01:53:05.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi