[Lazarus] Z-order not working

Graeme Geldenhuys mailinglists at geldenhuys.co.uk
Wed Apr 1 16:23:20 CEST 2015


Hi Dmitry,

On 2015-04-01 15:01, Dmitry Boyarintsev wrote:
> TImage is a graphic control (it doesn't have its own handle),

Ah, okay.  One of those differences between LCL and fpGUI.


> It should be a place into another control (i.e. TPanel) that is
> TWinControl (and does have a handle)

And that's where my second (actually I lost count today) problem lies.
How do I add a TPanel inside a TStatusBar for example. The TStatusbar
doesn't seem to accept child widgets.

My thinking is based on the auto-resizing issue of StatusBar Panels I
mentioned earlier. What I'm trying to do is paint an image at the right
edge of the StatusBar.

A quick test reveals that I can't place a TPanel inside a TStatusBar. It
seems the TStatusBar doesn't accept children.

So based on that and what you said, I have to now place a TPanel on the
form, then place a TImage inside the TPanel, then make sure the z-order
of the TPanel is correct so it appears above the TStatusBar, then
position the TPanel at the correct location relative to the right edge
of the statusbar. This is a pretty nasty solution.

Is there any better solution than the above?


Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/




More information about the Lazarus mailing list