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:
parent
3bcbc8fe8e
commit
41410610ef
@ -133,13 +133,6 @@ public:
|
||||
wxPopupTransientWindow() { }
|
||||
wxPopupTransientWindow(wxWindow *parent, int style = wxBORDER_NONE)
|
||||
{ Create(parent, style); }
|
||||
bool Create(wxWindow *parent, int style = wxBORDER_NONE)
|
||||
{
|
||||
return wxPopupTransientWindowBase::Create
|
||||
(
|
||||
parent, style | wxPU_CONTAINS_CONTROLS
|
||||
);
|
||||
}
|
||||
|
||||
// Implement base class pure virtuals.
|
||||
virtual void Popup(wxWindow *focus = NULL) wxOVERRIDE;
|
||||
|
@ -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 );
|
||||
|
Loading…
Reference in New Issue
Block a user