wxWebView and AttachUnknownControl

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
pkullmann
Earned a small fee
Earned a small fee
Posts: 11
Joined: Thu Nov 30, 2006 6:15 pm

wxWebView and AttachUnknownControl

Post by pkullmann » Mon Nov 19, 2012 10:46 am

Hi,

I am using wxWidgets 2.9.4, 32-bit on Win7, 64-bit.

I was trying to inject a wxWebView into an XRC-based panel, where I inserted a custom ("unknown") object. It would work in principle, however, the wxWebView was not sized according to the layout. The layout is correct, since using another control, it worked properly. When I set a size in the wxWebView::New, the control was displayed always with this fixed size, but not resized according to the layout.

I worked around the problem, by fetching the sizer and adding the control "by hand". This works fine.

The difference is (and the problem must be there somewhere), that the pure XRC approach uses an container window, in which AttachUnknownControl inserts the manually created control, whereas my work-around adds the control to the sizer directly.

Can someone confirm this problem, or have an idea what's wrong?

Peter

Post Reply