bueno... yo eso lo haría algo así:
Código Delphi
[-]
var
bmp: TBitmap;
Indice: Integer;
begin
case ListBox1.ItemIndex of
0: Indice := 4;
1: Indice := 2;
2: Indice := 10;
3: Indice := 4;
4: Indice := 2;
5: Indice := 10;
6: Indice := 0;
7: Indice := 6;
else Indice := 0;
end;
bmp := TBitmap.Create;
try
if ImageList1.GetBitmap(Indice, bmp) then
begin
bbtnComando.Glyph := bmp;
bbtnComando.Caption := ListBox1.Items[ListBox1.ItemIndex];
end
else
begin
bbtnComando.Glyph := nil;
bbtnComando.Caption := 'Error interno!';
end;
finally
bmp.Free;
end;
Hasta luego.