Bug? Z-order issue with tButton lazarus / 31-LCL ---------------------------------------------------------------------- IPguy · 2012-05-16 01:16 When I stack a tButton over a tLabel, the z-order has no effect.  I am not able to get the label to show up on top of the button by any combination of send to front / send to back /back one / forward one. Is this a bug?  I did not see anything for this in the bug list. Laz: 1.1-36568-2.6.1, win32-Vista ---------------------------------------------------------------------- felipemdc · 2012-05-16 05:44 It is not a bug. You need to separate LCL controls into 2 kinds of controls: *TWinControl descendents: Windowed controls, they have a window and therefore can receive keyboard focus. Cannot have real transparency but can be shaped using TWinControl.SetShape. TWinControl descendents can be grouped in 2 groups: 1->TCustomControl descendents which are controls implemented and drawn in the LCL. See http://wiki.lazarus.freepascal.org/Roadmap#Status_of_T CustomControl_based_controls_on_each_widgetset 2->Native controls. Those are implemented using native APIs (except in the LCL-CustomDrawn widgetset). See http://wiki.lazarus.freepascal.org /Roadmap#Status_of_native_controls_on_each_widgetset for a list *Other TControl descendents which don't descend from TWinControl: Those are just painted into the canvas of their parent and are called non-windowed controls. So they have no keyboard focus and should not be utilized for action controls, like buttons, because they are not accessible for the visually impaired. TLabel is the most often used control in this class. TSpeedButton too. See a list of non-windowed controls here: http://wiki.lazarus.freepasc al.org/Roadmap#Status_of_TGraphicControl_based_controls_on_each_widget set Logically since TLabel is just painted in it's parent canvas that it cannot be over a button. ---------------------------------------------------------------------- KpjComp · 2012-05-16 07:01 Like @felipemdc said, TButton is a TWinControl so you can't place TGraphicControls on top.  You can place a TLabel inside a TWinControl, eg.  TLabel inside a TPanel, but that's not the same thing. A TSpeedButton is a TGraphicControl, so you can use TLabel that is also TGraphicControl on top.  This works because both controls are painting on there parent's canvas.