Jump to content

Dialog is always rendered on top of main window


photo

Recommended Posts

Load attached test scenario.

Click on Floating dialog's buttons. They are clickable as expected.

Click on blue portion of main window to give main window focus.

Floating dialog continues to render on top of main window. Buttons show hover state when mouse is over them, but they cannot be clicked. Floating dialog also cannot be moved by LMB dragging. Workaround involves moving main window so it does not overlap floating dialog, then control can be regained over floating dialog.

 

I would be satisfied with either of two situations:
1) Floating dialog is truly always on top of main window. It is always rendered in front and is always clickable.

2) Floating dialog obeys traditional z-ordering of windows. Floating dialog renders in front of main window when floating dialog has focus, renders behind main window when main window has focus. Mouse input received by frontmost element.

 

Could someone please point out what I am doing wrong? How can I achieve both of the above situations? Many thanks in advance.

test.cpp

test.ui

Link to comment

Hello,

 

In the test.ui, you've got a scroll box that grabs focus when you click on the blue portion of the main window.
Herewith, the Floating dialog loses focus, so you cannot focus on it again.

Removing the scroll box will solve the problem.

<?xml version="1.0" encoding="utf-8"?>
<ui version="1.0">
	<vbox name="windowContents">
		<groupbox background="1" space="3">
		...
		</groupbox>
		<scrollbox align="expand" border="0"/>
	</vbox>
	...
Link to comment
×
×
  • Create New...