{"id":3879,"date":"2021-12-17T07:15:24","date_gmt":"2021-12-17T07:15:24","guid":{"rendered":"http:\/\/truelogic.org\/wordpress\/?p=3879"},"modified":"2021-12-17T10:21:38","modified_gmt":"2021-12-17T10:21:38","slug":"5b-wxwidgets-dynamic-positioning-with-sizers","status":"publish","type":"post","link":"https:\/\/truelogic.org\/wordpress\/2021\/12\/17\/5b-wxwidgets-dynamic-positioning-with-sizers\/","title":{"rendered":"5b. wxWidgets &#8211; Dynamic Positioning with Sizers"},"content":{"rendered":"\n<p><strong>OVERVIEW<\/strong><\/p>\n\n\n\n<p>Dynamic positioning is done using Sizers. We look at 5 kinds of Sizers. Each of them is briefly described below<\/p>\n\n\n\n<p>wxBoxSizer &#8211; This allows placement of controls stacked either vertically or horizontally.<\/p>\n\n\n\n<p>wxStaticBoxSizer &#8211; This is the same as wxBoxSizer but adds a box around the sizer.<\/p>\n\n\n\n<p>GridSizer &#8211; This lets us place controls in a grid consisting of rows and columns. The size of each cell will be the same.<\/p>\n\n\n\n<p>FlexGridSizer &#8211; This adds more flexibility to GridSizer because each row and column can have different sizes.<\/p>\n\n\n\n<p>GridBagSizer &#8211; This allows more complex layouts based on FlexGridSizer. In this each cell can span multiple rows or columns.<\/p>\n\n\n\n<p>The process of using a Sizer is as follows:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Create a Panel or other container object<\/li><li>Create a Sizer<\/li><li>Create Controls within the parent container<\/li><li>Add controls to the Sizer<\/li><li>Add the Sizer to the container<\/li><\/ul>\n\n\n\n<p> Dynamic Positioning with Sizers<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>  5b-1. wxBoxSizer<\/li><li>  5b-2. wxStaticBoxSizer<\/li><li>  5b-3. GridSizer<\/li><li>  5b-4. FlexGridSizer<\/li><li>  5b-5. GridBagSizer<\/li><li>  5b-6. Building a Complex UI <\/li><\/ul>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>OVERVIEW Dynamic positioning is done using Sizers. We look at 5 kinds of Sizers. Each of them is briefly described below wxBoxSizer &#8211; This allows <a class=\"mh-excerpt-more\" href=\"https:\/\/truelogic.org\/wordpress\/2021\/12\/17\/5b-wxwidgets-dynamic-positioning-with-sizers\/\" title=\"5b. wxWidgets &#8211; Dynamic Positioning with Sizers\">[&#8230;]<\/a><\/p>\n<\/div>","protected":false},"author":1,"featured_media":3595,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[302,365],"tags":[],"class_list":["post-3879","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cc","category-wxwidgets"],"_links":{"self":[{"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/posts\/3879","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/comments?post=3879"}],"version-history":[{"count":6,"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/posts\/3879\/revisions"}],"predecessor-version":[{"id":3891,"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/posts\/3879\/revisions\/3891"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/media\/3595"}],"wp:attachment":[{"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/media?parent=3879"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/categories?post=3879"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/tags?post=3879"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}