Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Coloboración Paypal con ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #16  
Antiguo 19-07-2005
Avatar de ContraVeneno
ContraVeneno ContraVeneno is offline
Miembro
 
Registrado: may 2005
Ubicación: Torreón, México
Posts: 4.740
Poder: 26
ContraVeneno Va por buen camino
vamos a ver...
aquí dibujo el checkbox en el grid, dame tiempo para probar si puedo hacer un edit y un post, pero por lo pronto aquí la primera parte. 0=falso, cualquier otra cosa =verdadero.

Código Delphi [-]
procedure TFrmInicial.DBGrid1DrawColumnCell(Sender: TObject;
  const Rect: TRect; DataCol: Integer; Column: TColumn;
  State: TGridDrawState);
var
  DrawState: Integer;
  DrawRect: TRect;
begin
  if (gdFocused in State) then
  begin
    if (Column.Field.FieldName = 'Campo') then
    begin
     CheckBox1.Left := Rect.Left + DBGrid1.Left + 2;
     CheckBox1.Top := Rect.Top + DBGrid1.top + 2;
     CheckBox1.Width := Rect.Right - Rect.Left;
     CheckBox1.Height := Rect.Bottom - Rect.Top;
     CheckBox1.Visible := True;
    end
  end
  else
  begin
    if (Column.Field.FieldName = 'Campo') then
    begin
      DrawRect:=Rect;
      InflateRect(DrawRect,-1,-1);
      if column.field.asinteger=0 then
       DrawState := DFCS_BUTTONCHECK
      else
       DrawState:= DFCS_CHECKED; 
      DBGrid1.Canvas.FillRect(Rect);
      DrawFrameControl(DBGrid1.Canvas.Handle, DrawRect,
                       DFC_BUTTON, DrawState);
    end;
  end; 
end;
__________________

Responder Con Cita
 



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 07:53:21.


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