Wednesday, 15 September 2010

c++ - wxWidgets BoxSizer not expanding to full width -


OK so I have a question about some wxWidgets sizers and how I thought they should work but acting Are not ..

minimum size

 big size

My installation is the same for these images:

  verticalBox = new WxBoxSizer (WxVERTICAL); ServerBarBox = New wxBoxSizer (wxHORIZONTAL); ServerBarBox-> Add (server entry, 5); ServerBarBox-> Add (portEntry, 1); Vertical box-> Add (serverbarbox, wxEXPAND);   

Now I thought the serverBarBox would take full width to expand, though it is not. How can I get such a thing from WxBoxSizer?

you wxEXPAND as a proportion not in the form of a flag .

To avoid such problems, instead of passing all SIP standards, prefer to use more explicitly. Such as rewriting your code above with

  serverbab> gt; Add (Server Enter, wxSizerFlags (). Ratio (5)); ServerBarBox-> Add (portEntry, wxSizerFlags (). Ratio (1)); Vertical box-> Add (ServerBarbox, wxSizerFlags (). Expand ());    

No comments:

Post a Comment