[Lazarus] Z-order not working

Dmitry Boyarintsev skalogryz.lists at gmail.com
Wed Apr 1 17:22:04 CEST 2015


On Wed, Apr 1, 2015 at 10:23 AM, Graeme Geldenhuys <
mailinglists at geldenhuys.co.uk> wrote:

> 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.
>
I'd think that's an editor (design time) limitation . TStatusBar is
TWinControl (has it's own handle).
Thus it can accept any child control.

If you assign Panel's parent in run time
Panel1.Parent:=StatusBar1;
You might get what you're looking for.

Keep in mind though StatusBar rearranges its children automatically.


> 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.
>

The only nastiness about it is that TPanel might draw a background, thus
the transparent image would look square.
Let me see...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20150401/866b70d4/attachment-0003.html>


More information about the Lazarus mailing list