Graphics - The MathWorks - #551

/ 667


catalogue search
P. 551
P. 552
P. 553
P. 554
P. 555
P. 556
P. 557
P. 558
P. 559
P. 560
P. 561
P. 562
P. 563
P. 564
P. 565
P. 566
P. 567
P. 568
P. 569
P. 570
P. 571
P. 572
P. 573
P. 574
P. 575
P. 576
P. 577
P. 578
P. 579
P. 580
P. 581
P. 582
P. 583
P. 584
P. 585
P. 586
P. 587
P. 588
P. 589
P. 590
P. 591
P. 592
P. 593
P. 594
P. 595
P. 596
P. 597
P. 598
P. 599
P. 600


See other catalogues for The MathWorks

Text version of the page
Using Panel Containers in Figures — Uipanels
Using Panel Containers in Figures — Uipanels
In this section...
"Introduction" on page 8-89
"Figure Resize Functions" on page 8-89
"Example — Using Figure Panels" on page 8-90
Introduction
Figures can contain axes and user interface objects directly, or you can parent these objects to uipanels, which you then parent to a figure. Uipanels are useful for the design of GUIs because they enable you to define subregions in a figure in which you can lay out components.
The MATLAB® software interprets the Position property of all objects parented to a uipanel relative to the uipanel's position. If you move the uipanel, the children automatically move with it.
Uipanels can also contain other uipanels, as well as axes, uicontrols, and uibuttongroups. See the uipanel reference page for more information on uipanels.
You can create multiple axes in a uipanel and direct plotting into any of them. However, some plotting functions do not allow you to specify the parent of the graphics objects they create, so they create a new axes (and possibly a figure). To include such a graph in a uipanel, you can reparent the axes to the panel once the plot is made.
Figure Resize Functions
Containing various parts of a GUI in uipanels simplifies the process of programming figure resize behavior because you can write a separate resize function for each panel. The following example illustrates how to do this.
8-89

pageCatalog pdf di En 2012-06-22-01