Add wxPU_CONTAINS_CONTROLS style for wxPopupWindow

This restores the default behavior of a popup window in MSW to the
behavior it had before 56c4191168. The new
flag added by this commit can be used to give the popup window the
behavior from after that commit, i.e. choose the implementation using a
WS_POPUP window rather than the default one using a WS_CHILD of the
desktop.

The old behavior kept the popup from taking focus from its parent window
but left some controls not working. The new behavior has the popup take
focus and lets all controls work.

Closes https://github.com/wxWidgets/wxWidgets/pull/1123
This commit is contained in:
New Pagodi
2019-01-09 12:09:30 -06:00
committed by Vadim Zeitlin
parent 8deb2cf0bb
commit 07f64c3b75
4 changed files with 100 additions and 8 deletions

View File

@@ -11,6 +11,19 @@
A special kind of top level window used for popup menus,
combobox popups and such.
@beginStyleTable
@style{wxPU_CONTAINS_CONTROLS}
By default in wxMSW, a popup window will not take focus from its parent
window. However many standard controls, including common ones such as
wxTextCtrl, need focus to function correctly and will not work when
placed on a default popup. This flag can be used to make the popup take
focus and let all controls work but at the price of not allowing the
parent window to keep focus while the popup is shown, which can also be
sometimes desirable. This style is currently only implemented in MSW
and simply does nothing under the other platforms (it's new since
wxWidgets 3.1.3).
@endStyleTable
@library{wxcore}
@category{managedwnd}