Is it possible to draw a child panel above its parent?

I’ve tried it all. I can’t figure out why a panel, which is parented to another, can’t draw on top of its parent at all.

Tried setting the focus?

**[Panel.RequestFocus

http://wiki.garrysmod.com/favicon.ico](wiki.garrysmod.com/?title=Panel.RequestFocus)**

Naw, I’m talking rendering order. Focus is not the same thing.

Wait, don’t children always draw above their parents? If I parent a DLabel to a DFrame, it draws over the DFrame.

No he means like, letting the child panel go off the side of the parent… Don’t you?

Ah, I looked back and needed to rephrase my question.

I need a child element to draw over all of the other elements in a DPanelList, where the child element is parented to an item of the DPanelList.

[editline]09:57PM[/editline]

http://dl.dropbox.com/u/256471/Capture.PNG

Like this, except without having to force that box to stay on top (it causes it to draw over the console and menu).

So you mean like a tooltip? It’s all up to ZOrder, so Panel.SetZPos, Panel.GetZPos might be what you are looking for.

:GetZPos wasn’t in the wiki, I didn’t know it existed :sigh:

I don’t know if it does exist. I’m just guessing.

**[Panel.SetZPos

http://wiki.garrysmod.com/favicon.ico](wiki.garrysmod.com/?title=Panel.SetZPos)**

Thanks Stoni :wink:

:SetZPos doesn’t work. I’ve gone up to 10,000 and it will still not draw above the other items.

Have you tried setting it to a negative number?

probably won’t do anything, but it is worth a try.

Garry is using negative values too :eng101:

Right, but does it bring the panel to the front?

It always works for me when I add the item last. It’s stupid, but it always works. (at least it does for me)

Add the label later than the icon and the label will probably be on top.

Huh, I will investigate the land of negative numbers and will report my discoveries.

[editline]05:04PM[/editline]

Well, negative draws everything infront, so that doesn’t help.

Give the buttons you want to be behind a higher Z-Order instead of decreasing the Z-Order of that object you want to draw infront.

I tried and it refused to make a difference. It probably has to do with me noclipping with a child element.