[Lazarus] TCustomControl and Z-order problem

Bart bartjunk64 at gmail.com
Fri Dec 26 16:07:19 CET 2014


On 12/25/14, Bart <bartjunk64 at gmail.com> wrote:

(Second attempt to post)

> On Windows, the new control is drawn over the TEdit (as I want,
> probably just by luck), but on GTK2 it is drawn behind the TEdit.

On further investigation it seems even more weird to me.
The TEdit is always drawn on top of the new TCustomControl, but the
new TCustomControl recieves mouseclicks if you click on the area where
it should be painted.

In the mean time i also checked QT-Linux, and there it works as (I) expected.

So, is it a GTK2 bug?
(I guess its a bug in my code though.)

See attached sample project.

Upon startup there should be a grayed-out text visible in front of the
TTHEdit and (unfortunately) in front of Panel2.
If you click on the text, it disappears.
It'll re-appear if you leave the TTHEdit and the TTHEdit is empty (Text = '').

On GTK2 the "overlay" is painted behind the TTHEdit (this control is
created at runtime) and behind Panel2.
On Win32 it is painted in front of the TTHEdit and in front of Panel2
(the latter is unwanted (but expected), and needs to be fixed
somehow).

Bart
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.zip
Type: application/zip
Size: 69393 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20141226/32a74fff/attachment-0003.zip>


More information about the Lazarus mailing list