Popup window over docked windows

Hi,

Is it possible to move (drag) popup window over docked window and how?
What I would like is to open some popup window anywhere on client window, not only over “main” window area.

Thanks.

I’ve done this by making a popup that uses a custom titlebar instead of the built in titlebar.

First set Titlebar Display Policy to Never.

Make your own titlebar for the window. It can be whatever you want, a label, a rectangle or other shape.

Next add this code and the custom properties as posted by user jaepark. Add the mouse pressed and dragged events to the titlebar only, not the root container.

This will make your window dragable to anywhere in the client (including off screen but you can handle that if needed.) And you also get to make a titlebar that looks better than the built in one with black text on a dark blue-gray background.

In my case I’ve made a template that I can drop on any new popup windows that has properties for setting the titlebar text and icon and also has a close button. I still have to add the custom properties (mX and mY) to the window’s root container.

Thank you JGJohnson.
I follow your idea and it works.
I only do not understand what is the purpose to limit popup windows to main window area?

1 Like

I second this question: why is it limited?

1 Like

Hi @JGJohnson, how can I limit the dragging to my project area. I have tried and if statement but doesn't work.

I only have script in place to keep the user from moving the window beyond the top of the client.

You could put in more conditionals for the left, right and bottom edged of your client. It does get trickier though. You will have to take into account the width and height of your popup window and you would have to figure out how to get the dimensions of the main client window. These are all things that I haven’t worked out and have not spent any time on because what I have is working fine for me.

	if move_Y < 0:
		move_Y = 0
	window.setLocation(move_X,move_Y)

Hi @JGJohnson, thanks for your reply.

I have found the way to limit the popups inside the workspace area. Even if the size of the popup it’s been changed for the user. I can share the code if anybody needs it.

Hi jespinmartin1, I’d definitely be keen to see the code for it :slight_smile: .