timage zorder lazarus / 39-Graphics ---------------------------------------------------------------------- jw · 2011-01-03 22:17 at design time I created several buttons and some timages.  Is there a way programmatically to set one of the timages in front of the other components and timages created during design time after it so that the timage that is behind everything is now font of it all? ---------------------------------------------------------------------- typo · 2011-01-03 22:30 BringToFront brings TImage at the topmost position of all graphics, but not of TButtons. Probably you need to set TButtons invisible. ---------------------------------------------------------------------- User137 · 2011-01-03 23:30 Or you can place the image inside a TPanel which can be on top of buttons. ---------------------------------------------------------------------- jw · 2011-01-04 02:14 ok what i've got is an animated gif useing vampireimageing library playing in a timage.  Like typo said the bringtofront put it ahead of the other images but not above buttons or edit boxes.  So how do I embed this timage into a panel? I suppose I could copy to the canvas but I think I'll lose the transparency anyway I'll give things a try thanks. ---------------------------------------------------------------------- User137 · 2011-01-04 12:25 There is no way you can draw transparent graphics on top of TButtons... I mean maybe can only if they are screenshot hacked, hiding them and drawing the buttons and then transparent image on top. Or simply using TImages as a button, changing the picture when click happens etc, those can be under the transparent picture. ---------------------------------------------------------------------- FangQ · 2017-06-30 20:50 I am trying to put a semi-transparent (png) TImage in front a set of components inside a GroupBox. I found all Tlabels are behind the image, but Teditbox and Tradiogroup are not. I saw in the earlier discussion that TButton can not be put behind TImage, what about TEditbox and TRadiogroups? thanks ---------------------------------------------------------------------- taazz · 2017-06-30 21:20 Quote from: FangQ on June 30, 2017, 10:50:45 pmI am trying to put a semi-transparent (png) TImage in front a set of components inside a GroupBox. I found all Tlabels are behind the image, but Teditbox and Tradiogroup are not. I saw in the earlier discussion that TButton can not be put behind TImage, what about TEditbox and TRadiogroups? thanks any twincontrol descendant can not be put behind any tgraphiccontrol descendant. ---------------------------------------------------------------------- FangQ · 2017-07-01 02:00 Quote from: taazz on June 30, 2017, 11:20:17 pmany twincontrol descendant can not be put behind any tgraphiccontrol descendant. I see. thanks for the clarifications. ---------------------------------------------------------------------- Handoko · 2017-07-01 03:51 If what you want to do is only to have an animated image on a button, you can try to use TBitButton + TImageList +  TTimer. Try my test.zip. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i unit Unit1; {$mode objfpc}{$H+} interface uses  Forms, Controls, Graphics, ExtCtrls, Buttons; type   { TForm1 }   TForm1 = class(TForm)    BitBtn1: TBitBtn;    ImageList1: TImageList;    Timer1: TTimer;    procedure BitBtn1Click(Sender: TObject);    procedure Timer1Timer(Sender: TObject);  end; var  Form1: TForm1; implementation {$R *.lfm} { TForm1 } procedure TForm1.BitBtn1Click(Sender: TObject);begin  BitBtn1.Caption := '';  Timer1.Enabled := not(Timer1.Enabled);end; procedure TForm1.Timer1Timer(Sender: TObject);const  AnimIndex: Byte = 0;var  ABitmap: TBitmap;begin  // Set image  ABitmap := TBitmap.Create;  ImageList1.GetBitmap(AnimIndex, ABitmap);  BitBtn1.Glyph.Assign(ABitmap);  ABitmap.Free;  // Animate it  Inc(AnimIndex);  if (AnimIndex >= ImageList1.Count) then AnimIndex := 0;end; end.