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
  #2  
Antiguo 12-11-2024
Avatar de newtron
[newtron] newtron is offline
Membrillo Premium
 
Registrado: abr 2007
Ubicación: Motril, Granada
Posts: 4.214
Poder: 24
newtron Va camino a la fama
Este es un código que tengo sobre un componente nuestro que deriva del StringGrid así que podrás interpretarlo fácilmente


Código Delphi [-]
procedure TFormManejaVerifactu.NTStringGrid3DrawCell(Sender: TObject; ACol,
  ARow: Integer; Rect: TRect; State: TGridDrawState);
var
  SelectedPicture: TBitmap;
begin
  // Resultados del envío: 0=Enviado 1=No enviado(errores) 2=Enviado con errores
  if NtStringGrid3.RowCount <2 then
    exit;
  with Sender as TStringGrid do begin

    if NtStringGrid3.ValorCeldaPorCampoYFila('RESULTADO',ARow)<>'' then begin
      if (ACol=0) then begin
        if NtStringGrid3.Cells[0,ARow]<>'' then begin
          SelectedPicture:=TBitmap.Create;
          If NtStringGrid3.Cells[0,ARow]='0' then begin
            ImageList.GetBitmap(0, SelectedPicture);
          end else if NtStringGrid3.Cells[0,ARow]='1' then begin
            ImageList.GetBitmap(1, SelectedPicture);
          end else if NtStringGrid3.Cells[0,ARow]='2' then begin
            ImageList.GetBitmap(2, SelectedPicture);
          end;
          NtStringGrid3.Canvas.Draw(Rect.Left-2, Rect.Top, SelectedPicture);
          SelectedPicture.Free;
        end;
      end;
    end;

  end;

end;


Saludos.
__________________
Be water my friend.
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
agregar imagen en SpeedButton darkbits Desarrollo en Delphi para Android 8 22-08-2015 01:57:27
Agregar boton con imagen pedrosan API de Windows 8 04-12-2009 16:21:45
Alguien me puede explicar como usar una imagelist???? Carnash Gráficos 2 01-09-2007 18:32:38
Como se maneja el componente ImageList Luis Alberto Varios 2 31-12-2005 11:34:20
Dibujar imagen con ImageList en StringGrid neon OOP 1 20-12-2004 18:24:44


La franja horaria es GMT +2. Ahora son las 08:55:36.


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