wxFrame resizing in wxNotebook

自古美人都是妖i 提交于 2019-12-25 02:22:21

问题


I am using wxwidget in windows. I have GUI which has several tabs. The requirements is user should have possibility resize the frame when switching between tabs. Now the current code is written like this. void XTab::OnPageChanged(wxNotebookEvent & event) { if(isActive()) { int page = event.GetOldSelection(); if(page!=-1) { XPanel * panel = (XPanel*)GetPage(page); panel->onUIDeactivate(); } page = event.GetSelection(); if(page!=-1) { XPanel * panel = (XPanel*)GetPage(page); xdmlASSERT(!panel->isActive()); panel->onUIActivate(); } RecalcSize(); DFrame::UpdateLayout(this);

Where Dframe is derived from wxFrame and XPanel is derived from wxPanel and XTab is from wxNotebook. Is there any I am using sizers in my code to put all child windows. panel is added to sizers and all child windows are in panel. RecalcSize() is againg caling GetSizer()->CalcMin() to get the minimum required size of frame. If user has resized frame this modified size should persist when switching between tabs. Currently this is not happening. How to achieve this?

来源:https://stackoverflow.com/questions/22937980/wxframe-resizing-in-wxnotebook

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!