Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

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

Coloboración Paypal con ClubDelphi

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 13-12-2003
Avatar de JavierB
JavierB JavierB is offline
Miembro
 
Registrado: may 2003
Ubicación: Madrid
Posts: 99
Poder: 24
JavierB Va por buen camino
Hola, SoftMakerMex.

No tento el componente que dices, pero tengo este código que saque de no recuerdo donde:
Código:
procedure TForm1.DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect;
  DataCol: Integer; Column: TColumn; State: TGridDrawState);
var
  Check: Integer;
  R: TRect;
begin
  if Column.FieldName = 'NombreCampo' then
  begin
    DBGrid1.Canvas.FillRect(Rect);
    Check := 0;
    if Table1.FindField('NombreCampo').AsBoolean then Check := DFCS_CHECKED;
    R:=Rect;
    InflateRect(R,-2,-2); //Disminuye el tamaño del CheckBox
    DrawFrameControl(DBGrid1.Canvas.Handle,R,DFC_BUTTON, DFCS_BUTTONCHECK or Check);
  end;
end;


procedure TForm1.DBGrid1CellClick(Column: TColumn);
begin
  if Column.FieldName = 'NombreCampo' then
  begin
    Table1.Edit;
    Table1.FindField('NombreCampo').AsBoolean:=not Table1.FindField('NombreCampo').AsBoolean;
  end;
end;
NombreCampo es el nombre del campo que tienes en tu base de datos como booleano.

Espero que te sirva. Saludos,
__________________
Lo importante no es saber, sino tener el e-mail del que sabe.
Responder Con Cita
Respuesta


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


La franja horaria es GMT +2. Ahora son las 06:45:25.


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