Hi,<br><br>I use wx 2.8.12 in a multiplatform application, I have been having a problem with the layout when I resize the main Frame, but '''only happens in Windows 7'''.<br><br>I couldn't find the source of the problem, so I was hoping someone could help me with it.<br>
<br>My application have several wxPanels composed in a tree structure with sizers, after resizing the top level window, the layout algorithm executes, but stops before reaching the last few panels(near leafs, and only in one branch of the tree). This branch of the tree is 8/9 panels in lenght.<br>
<br>I looked closely to the state of the sizers in that branch, and find out that one of the sizer's dimension was not being updated, so its dimension was different to the size of the containing window. <br>{{{<br>Window size: h 891 s 1076<br>
Sizer size: h 389 s 656<br>}}}<br><br>While debugging, I added a panel several levels up in the tree(containing the inconsistent panel). After this, the bug moved one level up, that is, the inconsistency between the windows an the sizer now happened in the parent of the previously broken window.<br>
<br>As a temporal fix, I am listening for wxEVT_SIZE in one of the parents(before broken sizer) and manually fixing the Size mismatch:<br>{{{<br>void FixSizers(wxWindow* pWindow) {<br> if(!pWindow->IsShown())<br> return;<br>
<br> wxSize windowsize = pWindow->GetSize();<br> if (pWindow->GetSizer()) <br> pWindow->GetSizer()->SetDimension(0, 0, windowsize.GetWidth(), windowsize.GetHeight());<br><br> wxWindowList& children = pWindow->GetChildren();<br>
for (size_t i = 0; i < children.size(); i++) <br> FixSizers(children[i]);<br>}<br>}}}<br><br>This solved the problem, but I would like to know if this has happened to someone else, and what could be a probable cause of this behaviour?<br>
<br>Thanks<br>Ramiro<br><br>