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 26-10-2004
frudolph frudolph is offline
Miembro
 
Registrado: oct 2004
Posts: 40
Poder: 0
frudolph Va por buen camino
En lugar de un componente checkbox prueba con esto:

Código:
procedure TForm1.StringGridMovimientosDrawCell(
	Sender: TObject; ACol, ARow: Integer; Rect: TRect; State: TGridDrawState);

const

AState: array[Boolean] of Cardinal = (0, DFCS_CHECKED);

begin

  with TStringGrid(Sender) do

	if (ARow > 0) and (ACol = 7) then
	  begin
		Canvas.FillRect(Rect);
		InflateRect(Rect, -2, -2);
		DrawFrameControl(Canvas.Handle, Rect, DFC_BUTTON, DFCS_BUTTONCHECK or AState[Cells[7, Arow] = 'F']);
	  end;
end;


Para que cuando el Usuario haga click en el checkbox y se tilde/destilde el mismo programa el Evento "OnMouseUp" del StringGrid con el siguiente código:

Código:
procedure TForm1.StringGridMovimientosMouseUp(
	Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
const
  AValue: array[Boolean] of String = ('', 'F');
var
  ACol, ARow: Integer;
begin
  with TStringGrid(Sender) do
	begin
	  MouseToCell(X, Y, ACol, ARow);
	  if (ARow > 0) and (ACol = 7) then
		Cells[ACol, ARow] := AValue[not (Cells[ACol, ARow] = 'F')];
	end;
end;

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


La franja horaria es GMT +2. Ahora son las 08:25:18.


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