Quick Help: Panels

I have 2 frames, FrameA and FrameB. FrameA is the primary frame wherefrom you can press a button and a bunch of FrameB’s are called into creation.

Currently, all of my FrameB’s are behind FrameA. I do not want that. I want my FrameB’s in front of FrameA.

How can I go about making it work like that? I’m having trouble finding a function that would do that for me in the gmod wiki’s ocean of panel functions.

If you need me to paste code, I can.

There’s way more functions buried in the code as well, but nobody’s bothered to document any of them yet. I’d say there’s more than 75% undocumented.

Anyway, try

Panel:RequestFocus,

Panel:MakePopup,

Panel:MoveToFront,

Panel:SetDrawOnTop or

Panel:SetZPos.

It’s a bit easier if you use a DPropertySheet, depending on whether you actually need separate windows.

I appreciate your reply! I got halfway to my goal, so I shall expand on the content of the frames.

Both frames were created and run with MakePopup. FrameB (and I will emphasize these are DFrames) is much smaller than FrameA (the main frame) and may sometimes extend past it (meaning I can’t parent - this is dynamic).

When FrameB is created, I need it to both be seen over top of FrameA (Panel:SetDrawOnTop accomplished this for me, thank you) and to have mouse privileges over FrameA.

As I just mentioned, SetDrawOnTop accomplishes seeing the FrameB over FrameA, but FrameA still has mouse/keyboard privileges (I know because all of my FrameB’s have unique painting done with OnCursorEntered).

How should I next proceed?

The wiki actually has an example that says what to do in your exact case. I didn’t even see it before:



-- Move the warning message to front constantly
function popup2:Think()
	self:MoveToFront()
end


I discovered what the problem was.



self.Main.Think = function()
	self.MainX, self.MainY = self.Main:GetPos()
	if self.Main:IsValid() then
		self.Main:MakePopup()
	end
end


Thanks for the help! I’m gonna lock the thread.