setUsingNativeTitleBar for DialogWindow does not work

Hi!

In a main component class I have DialogWindow. It works fine, but I cannot set native title bar:

scanWindow.reset ( new ScanWindow("scanning", Colours::blue));
scanWindow -> setBounds(100, 100, 400, 200);
scanWindow -> setUsingNativeTitleBar(true);
addAndMakeVisible(scanWindow.get());

If I check DialogWindow after:
scanWindow -> isUsingNativeTitleBar() // it returns true

What am I doing wrong?

Thank you in advance.

You’re adding it as a child component. Only top level windows can have it.

Make a default GUI project in projucer and look at how the main window class is configured in it’s constructor

Hint: look for the setVisible() usage

2 Likes

Thank you! I did work around, and I don’t attach DialogWindow to parent, but I call setVisible.

And if I set enterModalState() it works like it should.

But now I have another problem:
In fullscreen mode (mac) my DialogWindow is shown correctly. But when I go back to normal window (by pressing maximize button), and go to fullscreen again, then my main window exists full sceen and DialogWindow is not visible.

DialogWindow is shown on button click by calling setVisible().