Don't force wxPU_CONTAINS_CONTROLS on wxPopupTransientWindow

Popups not using this style work too now (since the parent commit), so
this style should be used only if the popup actually requires focus and
not always, unconditionally.

Turn on this style explicitly in the sample which shows a popup window
with wxTextCtrl inside it (which requires focus to work).
This commit is contained in:
Vadim Zeitlin
2020-07-10 00:00:56 +02:00
parent 3bcbc8fe8e
commit 41410610ef
2 changed files with 3 additions and 8 deletions

View File

@@ -108,7 +108,9 @@ wxBEGIN_EVENT_TABLE(SimpleTransientPopup,wxPopupTransientWindow)
wxEND_EVENT_TABLE()
SimpleTransientPopup::SimpleTransientPopup( wxWindow *parent, bool scrolled )
:wxPopupTransientWindow( parent )
:wxPopupTransientWindow( parent,
wxBORDER_NONE |
wxPU_CONTAINS_CONTROLS )
{
m_panel = new wxScrolledWindow( this, wxID_ANY );
m_panel->SetBackgroundColour( *wxLIGHT_GREY );