'How to create a floating widget hovering other widgets on Windows?
Assume we have a wxWebView control in both window hierarchy and sizer hierarchy. How do we create a static text "loading" hovering above the wxWebView on Windows? Thanks.
It's straightforward on Linux. Create a wxStaticText of which the parent/owner is the same as the wxWebView and that's all. Unfortunately, it won't work on Windows. The wxStaticText is invisible because it is covered by the wxWebView. I've tried many ways, including calling their method Lower and Raise to adjust their z-orders, but in vain.
I also tried putting the text into a wxFrame and use samples/shaped/ as an example, but on the second thought, the new top-level frame may cover the GUI of other processes. So it isn't a good design.
Any suggestion? Thanks.
Solution 1:[1]
wxWidgets doesn't support overlapping child controls, so you would need to use a different top level window for your floating control, typically a wxPopupWindow -- then you could either draw your text in it or make wxStaticText its child.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | VZ. |
