Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

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

Coloboración Paypal con ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #3  
Antiguo 08-05-2007
Avatar de droguerman
droguerman droguerman is offline
Miembro
 
Registrado: abr 2005
Ubicación: tierra
Posts: 999
Poder: 22
droguerman Va por buen camino
código (no probado)
Código Delphi [-]
TForma = class(TForm)
...
private
   lista : TStringList;
...
end;
procedure TForma.TuGridDblClick(Sender: TObject);
var
  indice : integer;
begin
  inherited;
  indice := lista.add(format('%d-%d',[TuGrid.Col, TuGrid.Row]);
  //0 = Azul 1=Rojo
  lista.objects := Pointer(1);
end;

procedure TForma.TuGridClick(Sender: TObject);
var
  indice : integer;
begin
  inherited;
  indice := lista.add(format('%d-%d',[TuGrid.Col, TuGrid.Row]);
  //0 = Azul 1=Rojo
  lista.objects := Pointer(0);
end;

procedure TfmCompra.fraGridxgGridDrawCell(Sender: TObject; ACol,
  ARow: Integer; Rect: TRect; State: TGridDrawState);
var
  texto : string;
  indice : integer;
  colorCelda : TColor;
begin
  inherited;
  texto := IntToStr(ACol)+'-'IntToStr(ARow);
  indice := lista.indexOf(texto);
  if indice>=0 then
  begin
     if Integer(lista.objects[indice])=0 then
         colorCelda := clBlue
    else if Integer(lista.objects[indice])=1 then
         colorCelda := clRed;
  end
  else
     colorCelda :=  TuGrid.color; 

  TuGrid.Canvas.Brush.color := colorCelda;
  TuGrid.Canvas.fillRect(Rect); 
end;

saludos
__________________
self.free;
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
Ayuda en el Uso del StringGrid doncowboy OOP 2 24-04-2007 19:26:33
Stringgrid + combobox ayuda porfavor serebi Varios 2 21-12-2006 18:00:21
Ayuda con Stringgrid estebanx OOP 4 01-06-2006 20:20:24
ayuda con stringgrid y memo rober Varios 3 14-08-2004 20:08:38
Ayuda en StringGrid Fita Varios 3 08-11-2003 13:03:18


La franja horaria es GMT +2. Ahora son las 15:14:08.


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