Affecter un glyph dans un Boutton. [Résolu]

Signaler
Messages postés
79
Date d'inscription
samedi 28 décembre 2002
Statut
Membre
Dernière intervention
27 juin 2011
-
cs_Michel34
Messages postés
79
Date d'inscription
samedi 28 décembre 2002
Statut
Membre
Dernière intervention
27 juin 2011
-
Salut , j'ai minimise un programme test pour vous expliquer mon souci.

Si vous tester leprogramme , j'affecte bien l'image de ma Timagelist dans les 2 Boutons au premier clik , mais apres je n'arrive pas a affecter une autre image a la place de la premiere.
j'ai du oublier quelque chose comme liberer le glyph du boutton avant de reinstaller une autre image , mais je ne vois pas comment faire , j'ais regarde en long et en large le fichier d'aide ,mais rien !!!
Alors si quelqu'un a une idée , je prends . Merci d'avance .
je joint le petit programme test pour voir.
//////////////////////////////////////////////////////////////////////
Le fichier .Pas

unit Unit2;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ImgList, Buttons, StdCtrls;

type
TForm2 = class(TForm)
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
SpeedButton1: TSpeedButton;
Liste: TImageList;
Label1: TLabel;
procedure BitBtn1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Déclarations privées }
public
{ Déclarations publiques }
X : Integer;
end;

var
Form2: TForm2;

implementation

{$R *.dfm}

procedure TForm2.BitBtn1Click(Sender: TObject);
begin
Liste.GetBitmap(X,BitBtn2.Glyph);
Liste.GetBitmap(X,SpeedButton1.Glyph);
if X = 5 then X:=-1;
Inc(X);
Label1.Caption:=IntToStr(X);
end;

procedure TForm2.FormCreate(Sender: TObject);
begin
X:=0;
end;

end.

///////////////////////////////////////////////////////////////////////////////////////////

Le fichier .DFM

object Form2: TForm2
Left = 0
Top = 0
Caption = 'Form2'
ClientHeight = 204
ClientWidth = 635
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
OnCreate = FormCreate
PixelsPerInch = 96
TextHeight = 13
object SpeedButton1: TSpeedButton
Left = 342
Top = 48
Width = 121
Height = 103
end
object Label1: TLabel
Left = 522
Top = 66
Width = 41
Height = 77
Alignment = taCenter
Caption = '0'
Font.Charset = DEFAULT_CHARSET
Font.Color = clNavy
Font.Height = -64
Font.Name = 'Tahoma'
Font.Style = [fsBold]
ParentFont = False
Layout = tlCenter
end
object BitBtn1: TBitBtn
Left = 22
Top = 48
Width = 121
Height = 103
Caption = 'BitBtn1'
DoubleBuffered = True
ParentDoubleBuffered = False
TabOrder = 0
OnClick = BitBtn1Click
end
object BitBtn2: TBitBtn
Left = 184
Top = 48
Width = 121
Height = 103
Caption = 'BitBtn2'
DoubleBuffered = True
ParentDoubleBuffered = False
TabOrder = 1
end
object Liste: TImageList
Height = 24
Width = 24
Left = 10
Top = 8
Bitmap = {
494C0101050008001C0018001800FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
0000000000003600000028000000600000003000000001002000000000000048
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000001000520008004200080042000800
4200080042001008420008004200080042001008420008004200100842000800
4200080042001008420008004200080042000800420008004200100842000800
4200080042001008420008003900080039000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000018007B001000630010006B001000
6300100063001000630010006300100063001000630010006300100063001000
6300100063001000630010006300100063001000630010006300100063001000
6300100063001000630010006300100063000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000002100AD002100A5002100A5002100
A5002100A5002100A5002100A5002100A5002100A5002100A5002100A5002100
A5002100A5002100A5002100A5002100A5002100A5002100A5002100A5002100
A5002100A5002100A5002100A5002100A5000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000004221CE003918CE003918CE003910
CE003910CE003910CE003910CE003910CE003910CE003910CE003910CE003910
CE003910CE003910CE003910CE003910CE003910CE003910CE003910CE003910
CE003910CE003108C6003910CE003108C6000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000007B63DE007352DE006B52D6007352
DE006B52D6007352DE006B52D600735ADE006B52D6006B52D6007352DE006B52
D600735ADE006B52D6006B52D6006B52D6006B52D6007352DE006B52D6006B52
DE006B52D6006B52DE006B52D6006B4AD6000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000A594E7009C8CE7009C84E7009C8C
DE009484E7009484E7009484E7009484E7009484E7009C8CDE009484E7009484
E7009484E7009484E7009484E7009484E7009C8CDE009484E7009484E7009484
E7009484E7009484E7009484E7009484E7000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000D6D6D600E7E7E7009C9C9C00DEDE
DE00E7E7E700E7E7E700EFEFEF00CECECE00ADADAD00DEDEDE00EFEFEF00EFEF
EF00CECECE00B5B5B5009C9C9C00A5A5A500B5B5B500DEDEDE00F7F7F700DEDE
DE00EFEFEF00B5B5B500ADADAD00F7F7F7000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000F7F7F700B5B5B500BDBDBD00CECECE00CECECE00CECECE00CECE
CE00CECECE00CECECE00CECECE00CECECE00C6C6C600B5B5B500BDBDBD000000
0000000000000000000000000000000000000000000000000000000000000000
00000000000000000000B5B5B500BDBDBD00CECECE00C6C6C600CECECE00CECE
CE00CECECE00CECECE00CECECE00C6C6C600CECECE00B5B5B500BDBDBD000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000CECECE00BDBD
BD00A5A59C005263390031421000213900002131000021390000293900002139
0000213900002139000021390000213100002139000029420800425221008C8C
7B00BDBDBD00ADADAD0000000000000000000000000000000000CECECE00BDBD
BD009C9CA5003939630010104200000039000000390000003900000039000000
3900000039000000390000003900000039000000390008083900212152007B7B
8C00BDBDBD00ADADAD0000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000ADADAD00B5B5B5006B7B52002942
0000314A000029420000314A0000314A0000314A0000314A0000314A0000314A
0000314A0000314A0000314A000029420000314A0000314A0000314A0000314A
0000314A000052632900ADADA500B5B5B500ADADAD00B5B5B50052527B000000
420000004200000042000000420000004A00000042000000420000004A000000
4A000000420000004A0000004200000042000000420000004200000042000000
4A000000420029296300A5A5AD00B5B5B5000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000007B84630039520000395A00003952
000039520000395200003952000039520000395200003952000039520000395A
0000395200003952000039520000395200003952000039520000395200003952
0000395200003952000039520000526B29006363840000005200000052000000
5200000052000000520000005200000052000000520000005200000052000000
5200000052000000520000005200000052000000520000005200000052000000
520000005200000052000000520029296B000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000004263000042630000426B00004263
0000426300004263000042630000426B00004263000042630000426300004263
000042630000426B000042630000426300004263000042630000426300004263
0000426300004263000042630000426300000000630000006300000063000000
6300000063000000630000006300000063000000630000006300000063000000
6300000063000000630000006300000063000000630000006300000063000000
6300000063000000630000006300000063006B0000005A000000520000005200
0000520000005200000052000000520000005200000052000000520000005200
0000520000005200000052000000520000005200000052000000520000005200
00005200000052000000520000004A000000004A6B0000395A00003952000039
5200003952000039520000395200003952000039520000395200003952000039
5200003952000039520000395200003952000039520000395200003952000039
520000395200003952000031520000314A004A7300004A730000527B00004A73
00004A7300004A7300004A730000527B00004A7300004A7300004A7300004A73
00004A730000527B00004A7300004A7300004A7300004A730000527B00004A73
00004A7300004A7300004A7300004A7300000000730000007300000073000000
7300000073000000730000007300000073000000730000007300000073000000
7300000073000000730000007300000073000000730000007300000073000000
730000007300000073000000730000007300940000008C0000008C0000008400
0000840000008C000000840000008400000084000000840000008C0000008400
000084000000840000008C000000840000008400000084000000840000008C00
00008400000084000000840000007B00000000639400005A8C00005A8400005A
8400005A8400005A8400005A8400005A8400005A8400005A8400005A8400005A
8400005A8400005A8400005A8400005A8400005A8400005A8400005A8400005A
8400005A8400005A8400005A840000527B005A840000528400005A8400005284
0000528400005A840000528400005A840000528400005A8400005A8400005A84
00005A8400005A840000528400005A8400005A84000052840000528400005A84
00005A8400005A840000528400005A8400000000840000008400000084000000
8400000084000000840000008400000084000000840000008400000084000000
8400000084000000840000008400000084000000840000008400000084000000
840000008400000084000000840000008400E7000000DE000000D6000000D600
0000D6000000D6000000D6000000D6000000D6000000D6000000D6000000D600
0000D6000000D6000000D6000000D6000000D6000000D6000000D6000000D600
0000D6000000D6000000D6000000D6000000009CE7000094D6000094D6000094
D6000094D6000094D6000094D6000094D6000094D6000094D6000094D6000094
D6000094D6000094D6000094D6000094D6000094D6000094D6000094D6000094
D6000094D6000094D6000094D600008CCE006394000063940000639400006394
000063940000639400006394000063940000639400005A8C0000639400006394
000063940000639400005A8C0000639400006394000063940000639400006394
000063940000639400005A8C00005A8C00000000940000008C00000094000000
94000000940000008C0000009400000094000000940000008C0000008C000000
8C0000008C00000094000000940000008C000000940000009400000094000000
94000000940000008C000000940000008C00FF292900FF181800FF181800FF10
1000FF101000FF101000FF101000FF101000FF101000FF101000FF101000FF10
1000FF101000FF101000FF101000FF101000FF101000FF101000FF101000FF10
1000FF101000FF101000FF101000FF10100029BDFF0018B5FF0018B5FF0018B5
FF0018B5FF0018B5FF0018B5FF0018B5FF0018B5FF0018B5FF0018B5FF0018B5
FF0018B5FF0018B5FF0018B5FF0018B5FF0018B5FF0018B5FF0018B5FF0018B5
FF0018B5FF0018B5FF0018B5FF0018B5FF006B9C00006B9C00006B9C00006B9C
00006B9C00006B9C00006B9C00006B9C00006B9C00006B9C00006B9C00006B9C
00006B9C00006B9C00006B9C00006B9C00006B9C00006B9C00006B9C00006B9C
00006B9C00006B9C00006B9C00006B9C000000009C0000009C0000009C000000
9C0000009C0000009C0000009C0000009C0000009C0000009C0000009C000000
9C0000009C0000009C0000009C0000009C0000009C0000009C0000009C000000
9C0000009C0000009C0000009C0000009C00FF636300FF5A5A00FF525200FF52
5200FF525200FF525200FF525200FF525200FF525200FF525200FF525200FF52
5200FF525200FF525200FF525200FF525200FF525200FF525200FF525200FF52
5200FF525200FF525200FF525200FF5252006BCEFF005ACEFF0052C6FF005ACE
FF0052C6FF0052CEFF005ACEFF0052C6FF0052CEFF0052C6FF0052CEFF005ACE
FF0052C6FF0052CEFF005ACEFF0052C6FF005ACEFF0052C6FF0052CEFF005ACE
FF0052C6FF0052CEFF0052CEFF0052C6FF00637B390073AD000073AD000073AD
000073B5000073AD000073AD000073AD000073AD000073AD000073AD000073AD
000073AD000073AD000073B5000073AD000073AD000073B5000073AD000073B5
000073B5000073AD000073B50000739C180039397B000000AD000000AD000000
AD000000AD000000B5000000AD000000AD000000AD000000AD000000AD000000
AD000000AD000000AD000000B5000000AD000000AD000000B5000000AD000000
B5000000B5000000B5000000B50018189C00FF949400FF8C8C00FF848400FF84
8400FF848400FF848400FF848400FF848400FF848400FF848400FF848400FF84
8400FF848400FF848400FF848400FF848400FF848400FF848400FF848400FF84
8400FF848400FF848400FF848400FF84840094DEFF008CDEFF0084D6FF0084D6
FF0084D6FF0084D6FF0084D6FF0084D6FF0084D6FF0084D6FF0084D6FF0084D6
FF0084D6FF0084D6FF0084D6FF0084D6FF0084D6FF0084D6FF0084D6FF0084D6
FF0084D6FF0084D6FF0084D6FF0084D6FF0052525200525252006B8C29007BBD
00007BBD00007BBD0000B5D66B00B5DE6B00B5D66B00B5DE6B00B5D66B00B5DE
6B00B5DE6B00B5DE6B00B5DE6B00B5DE6B00B5DE6B00B5DE6B00B5DE6B007BBD
00007BBD000073A510005A5A4A0052525200525252005252520029298C000000
BD000000BD000000BD006B6BD6006B6BDE006B6BDE006B6BDE006B6BDE006B6B
D6006B6BDE006B6BD6006B6BDE006B6BDE007373DE006B6BDE007373DE000000
BD000000BD001010A5004A4A5A0052525200D6D6D600E7E7E7009C9C9C00DEDE
DE00E7E7E700E7E7E700EFEFEF00CECECE00ADADAD00DEDEDE00EFEFEF00EFEF
EF00CECECE00B5B5B5009C9C9C00A5A5A500B5B5B500DEDEDE00F7F7F700DEDE
DE00EFEFEF00B5B5B500ADADAD00F7F7F700D6D6D600E7E7E7009C9C9C00DEDE
DE00E7E7E700E7E7E700EFEFEF00CECECE00ADADAD00DEDEDE00EFEFEF00EFEF
EF00CECECE00B5B5B5009C9C9C00A5A5A500B5B5B500DEDEDE00F7F7F700DEDE
DE00EFEFEF00B5B5B500ADADAD00F7F7F70000000000DEDEDE004A4A4A004A4A
4A005263390073A5180084C608008CCE000084CE00008CCE000084CE00008CCE
000084CE000084CE00008CCE000084CE00008CCE000084C600007BAD1000637B
31004A4A4A004A4A4A00737373000000000000000000DEDEDE004A4A4A004A4A
4A00393963001818A5000808C6000000CE000000CE000000CE000000CE000000
CE000000CE000000CE000000CE000000CE000000CE000000C6001010AD003131
7B004A4A4A004A4A4A0073737300000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000BDBDBD005252520039393900393939003939390042424200393939004242
4200424242003939390042424200393939004242420039393900393939006B6B
6B00000000000000000000000000000000000000000000000000000000000000
0000BDBDBD005252520039393900393939003939390042424200393939004242
4200424242003939390042424200393939004242420039393900393939006B6B
6B00000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000424D3E000000000000003E000000
2800000060000000300000000100010000000000400200000000000000000000
000000000000000000000000FFFFFF00FFFFFF000000000000000000FFFFFF00
0000000000000000FFFFFF000000000000000000FFFFFF000000000000000000
FFFFFF000000000000000000FFFFFF000000000000000000FFFFFF0000000000
00000000FFFFFF000000000000000000FFFFFF00000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000FFFFFF000000000000000000FFFFFF00
0000000000000000FFFFFF000000000000000000FFFFFF000000000000000000
FFFFFF000000000000000000FFFFFF000000000000000000FFFFFF0000000000
00000000FFFFFF000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFF8001FFC001FFFFFFFFFFFFFC00003C00003FFFF
FFFFFFFF000000000000FFFFFFFFFFFF000000000000FFFFFFFFFFFF00000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000800001800001FFFFFFFFFFFFF0000FF0
000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000000000000000
000000000000}
end
end



A+ Michel

5 réponses

Messages postés
79
Date d'inscription
samedi 28 décembre 2002
Statut
Membre
Dernière intervention
27 juin 2011

Merci Pierrot , ca fonctionne , ce qui est etrange c'est que j'avais tente le NIL avant de recreer le bouton , et j'avais une erreur , alors je pense que je ne liberé pas au bon moment.

A+ Michel
Messages postés
105
Date d'inscription
mardi 13 novembre 2007
Statut
Membre
Dernière intervention
8 avril 2019
2
Bonjour,
J'ai testé chez moi, même pb.
Voici une solution qui ne résoudra peut être pas ton problème
En installant un TToolbar et en déposant un TToolBtn dessus et en affectant à la propriété ImageIndex de ce TToolBtn les valeurs de x on affiche un nouveau glyph.

procedure TForm1.FormCreate(Sender: TObject);
begin
x := 0;
Label1.caption := 'Nb d''images dans la liste : ' + IntToStr(Liste.Count);
// Pour voir
Liste.GetBitmap(4, SpeedButton1.Glyph); // Affiche bien la 4ème images de la liste
end;

procedure TForm1.BitBtn1Click(Sender: TObject);
begin
Liste.GetBitmap(X, BitBtn2.Glyph); // Affiche toujours la 1ère image de la liste
ToolBtn.ImageIndex := x; // Change d'image à chaque incrément de x
if x > Liste.Count -1 then
x := -1; // if x=5 then x=-1
Label1.Caption := 'Valeur de x : ' + IntToStr(x);
Inc(x);
end;



pierrot
Messages postés
105
Date d'inscription
mardi 13 novembre 2007
Statut
Membre
Dernière intervention
8 avril 2019
2
Re,
j'ai trouvé sur un forum ceci:
Avant d'afficher un nouveau glyph assigner NIL au glyh existant
BitBtn2.Glyph := nil;
SpeedButton1.Glyph := Nil;
et ça amrche


pierrot

Salut

Et avec un coup de refresh (absent de ton code) ça donne quoi ? (Non testé)
Messages postés
79
Date d'inscription
samedi 28 décembre 2002
Statut
Membre
Dernière intervention
27 juin 2011

Salut ,je viens de tester le ' refresh " , aucune réaction ,le Nil fonctionne correctement ,il suffisait de le mettre a l'endroit juste.

A+ Michel