Box layout management

Source: Internet
Author: User

You can specify the layout direction when creating the Wx. boxsizer object:

Hbox = wx. boxsizer (wx. Horizontal) is set to horizontal

Hbox = wx. boxsizer () is horizontal by default.

Vbox = wx. boxsizer () sets the vertical direction

To add a child window or control to the parent window, you must call wx. the add () method of the boxsizer object. The add () method is from the parent class wx. the add () method syntax inherited by sizer is described as follows:

Add (Windows, proportion = 0, flag = 0, border = 0, userdata = none) to the parent window

Add (sizer, proportion = 0, flag = 0, border = 0, userdata = none) to another sizer for nesting

Add (width, height, porprotion = 0, flag = 0, border = 0, userdata = none) to add a blank control

Wx. allgn_top Top alignment
Wx. allgn_bottom Bottom alignment
Wx. allgn_left Left aligned
Wx. allgn_right Right alignment
Wx. allgn_center Center alignment
Wx. allgn_center_vertical Vertical center alignment
Wx. allgn_center_horizontal Align horizontally
Wx. allgn_centre The same as wx. allgn_center
Wx. allgn_centre_vertical The same as wx. allgn_center_vertical.
Wx. allgn_centre_horizontal The same as wx. allgn_center_horizontal.

 

Wx. Top Set a border on the top. The Border Width needs to be set through the border of the add () method.
Wx. Bottom Set a border at the bottom
Wx. Left Set a left border
Wx. Right Set the right border
Wx. All Set a border with Four Sides

 

Wx. Expand Adjust sub-windows or controls to fill up valid space completely
Wx. Shaped Adjust the sub-window or control to fill up the valid space, but retain the aspect ratio
Wx. fixed_minsize Adjust the child window or widget to the minimum size
Wx. reserve_space_event_hi_hidded After this flag is set, if the child window or control is hidden, the occupied space is retained.

Box layout management

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.