Wxaui frame management usage

Source: Internet
Author: User

wxaui frame management usage:
1. general steps
# Install wxpython2.8 .*. *
Import wx. AUI
# initialize a wxaui management framework object
Mgr = wx. AUI. auimanager ()
# notify self as the parent object for managing all sub-objects
# self can be any sub-object of wxwindow
Mgr. setmanagedwindow (Self)
# Place the control in the specified position (For details, refer to "2. layout step ")
Mgr. addpane (wxwindow * window, const wxauipaneinfo & pane_info)
# "commit" all changes made to framemanager
Mgr. update ()
2. layout step
call the methods provided in wxauipaneinfo (), for example:
pane1 = wx. panel (Self)
Mgr. addpane (pane1, wx. AUI. auipaneinfo ().
name ("test1 "). caption ("pane1 ").
closebutton (true ). maximizebutton (true)
the following four steps are most important:
(1) Direction: first, determine the center object, in this way, you can determine the control that is stretched around.
determine the left, right, top, and bottom.
(2) layer: controls with the same layer can be considered as a whole, similar to boxsizer,

Objects close to the center start from the center to the four sides (the center itself is not calculated)Which is the default value of layer (0 ).The number indicates the number of rows and columns used to complete the layout. Do not calculate the number in the center. Haha

(3) position: the order in which controls are placed in the same direction and layer. By default

Horizontal and vertical

(4) Row: in the same direction and layer, change the default placement mode.


3. Function details
(1) minsize ()
Only act on the first control in one direction
(2) fixed ()
After a panel, Mgr. Update () does not respond to the onsize () event, that is, it does not call the layout () method,
Therefore, you must call layout () in the panel ()
(3) setdocksizeconstraint (double widthpct, double heightpc)
Adjust the ratio of the dock between two windows
Wxauimanager by default limits the size of any new dock to 1/3 of the window size

Wxaui frame management usage

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.