![]() |
![]() |
![]() |
![]() |
![]() |
FTP | ![]() |
![]() |
CCD | ![]() |
![]() |
Buscar | ![]() |
![]() |
Trucos | ![]() |
![]() |
Trabajo | ![]() |
![]() |
Foros | ![]() |
|
Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Temas de Hoy |
![]() |
|
Herramientas | Buscar en Tema | Desplegado |
#1
|
|||
|
|||
Como agregar una imagen de una ImageList en un Stringgrid
Hola amigos,
Tengo este codigo pero no tengo idea de como agregar las imagenes que tengo almacenadas en un Imagelist. Si alguien me puede orientar estare agradecido Código:
procedure TFormMain.StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer; Rect: TRect; State: TGridDrawState); var Alin: integer; begin with Sender as TStringGrid do begin if ARow = 0 then Alin:= DT_CENTER else Alin:= DT_RIGHT; if ACol = 0 then Alin:= DT_LEFT; if ARow = 0 then Alin:= DT_CENTER; // Dibujar texto centrado horizontal y verticalmente o a la derecha InflateRect(Rect, -1, -1); Canvas.FillRect(Rect); InflateRect(Rect, -3, -3); DrawText(Canvas.Handle, PAnsiChar(Cells[ACol, ARow]), Length(Cells[ACol, ARow]), Rect, Alin or DT_VCENTER or DT_SINGLELINE); end; end; |
#2
|
||||
|
||||
Este es un código que tengo sobre un componente nuestro que deriva del StringGrid así que podrás interpretarlo fácilmente
Saludos.
__________________
Be water my friend. |
#3
|
||||
|
||||
Un par de ejemplos que puedes encontrar en el FTP del club, aunque seguro que si buscas hay más...
https://terawiki.clubdelphi.com/Delp...n_imagenes.zip https://terawiki.clubdelphi.com/Delp..._imagenes2.zip https://terawiki.clubdelphi.com/Delp...n_imagenes.zip
__________________
Germán Estévez => Web/Blog Guía de estilo, Guía alternativa Utiliza TAG's en tus mensajes. Contactar con el Clubdelphi ![]() P.D: Más tiempo dedicado a la pregunta=Mejores respuestas. |
#4
|
|||
|
|||
Muchas gracias a todos
|
![]() |
|
|
![]() |
||||
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 |
![]() |
|