source: MML/trunk/machine/SOLEIL/common/toolbox/GUILayout/layoutHelp/User guide4_2.html @ 4

Last change on this file since 4 was 4, checked in by zhangj, 10 years ago

Initial import--MML version from SOLEIL@2013

File size: 5.3 KB
Line 
1<html xmlns:saxon="http://icl.com/saxon">
2   <head>
3      <link rel="stylesheet" type="text/css" href="doc.css"/>
4      <link rel="stylesheet" type="text/css" href=""/>
5      <meta author="The MathWorks Ltd."/>
6      <meta copyright="2011 The MathWorks Ltd."/>
7      <title>Setting defaults for all windows</title>
8   </head>
9
10   
11    <body>
12      <table class="header" width="100%" border="0" cellspacing="0" cellpadding="0">
13         <tr>
14            <td bgcolor="#e4f0f8"><A href="User guide.html"><font face="Arial" bgcolor="#e4f0f8" size="+0" underline="0" color="#000000"><b>User guide</b></font></A></td>
15            <td width="36" bgcolor="#e4f0f8"><A HREF="User guide4_1.html"><IMG SRC="Images/leftarrow.png" BORDER="0" ALT="previous page"/></A><A HREF="User guide5.html"><IMG SRC="Images/rightarrow.png" BORDER="0" ALT="next page"/></A></td>
16         </tr>
17      </table>
18   
19
20      <br clear="all"/>
21         
22      <h2>4.2: Setting defaults for all windows&nbsp;<a href="User guide4.html"><img src="Images/uparrow.png" border="0" align="top" alt="Go back up one level"/></a></h2>
23     
24            <p>As well as modifying the <a href="FigureDefaults.html">defaults used in one window</a>,
25        it is possible to override the defaults used for all windows. This makes use of
26    the special "0" handle that roughly corresponds to the MATLAB environment. Note, however,
27that defaults set at the window level take precedence.</p>
28            <p>The example below shows how defaults can be set for the panel title-bar color
29            and font for all windows, but the font size is overridden for the second window:</p>
30            <example>
31                <pre style="background-color: #eeeeff; margin-left: 20px; margin-right: 20px"><font color="#000011"><a href="uiextras.set.html"><code class="FUNCTION">uiextras.set</code></a>( 0, <code class="STRING">'DefaultHBoxBackgroundColor'</code>, [0.3 0.3 0.3] );
32<a href="uiextras.set.html"><code class="FUNCTION">uiextras.set</code></a>( 0, <code class="STRING">'DefaultBoxPanelTitleColor'</code>, <code class="STRING">'y'</code> );
33<a href="uiextras.set.html"><code class="FUNCTION">uiextras.set</code></a>( 0, <code class="STRING">'DefaultBoxPanelFontSize'</code>, 14 );
34f1 = <a href="matlab:doc figure"><code class="FUNCTION">figure</code></a>();
35h = <a href="uiextras.HBox.html"><code class="FUNCTION">uiextras.HBox</code></a>( <code class="STRING">'Parent'</code>, f1, <code class="STRING">'Padding'</code>, 10, <code class="STRING">'Spacing'</code>, 10 );
36p1 = <a href="uiextras.BoxPanel.html"><code class="FUNCTION">uiextras.BoxPanel</code></a>( <code class="STRING">'Parent'</code>, h, <code class="STRING">'Title'</code>, <code class="STRING">'Panel 1'</code> );
37p2 = <a href="uiextras.BoxPanel.html"><code class="FUNCTION">uiextras.BoxPanel</code></a>( <code class="STRING">'Parent'</code>, h, <code class="STRING">'Title'</code>, <code class="STRING">'Panel 2'</code> );
38f2 = <a href="matlab:doc figure"><code class="FUNCTION">figure</code></a>();
39<a href="uiextras.set.html"><code class="FUNCTION">uiextras.set</code></a>( f2, <code class="STRING">'DefaultBoxPanelFontSize'</code>, 20 );
40p3 = <a href="uiextras.BoxPanel.html"><code class="FUNCTION">uiextras.BoxPanel</code></a>( <code class="STRING">'Parent'</code>, f2, <code class="STRING">'Title'</code>, <code class="STRING">'Panel 3'</code> );</font></pre>
41            <p style="background-color: #ddddee; margin-left: 20px; margin-right: 20px"><font color="#000022"><center><img src="Images/DefaultsSystem1.png"/><img src="Images/DefaultsSystem2.png"/></center></font></p>
42            </example>
43            <p>It is important to note that although the default has been set
44            system-wide, it is not preserved between MATLAB sessions.</p>
45       
46     
47      <br clear="ALL"/>
48      <table class="footer" width="100%" border="0" cellspacing="0" cellpadding="0">
49         <tr>
50            <td width="18" height="15" bgcolor="#e4f0f8" align="left"><a href="User guide4_1.html"><img src="images/leftarrow.png" border="0" alt="previous page"/></a></td>
51            <td width="40%" height="15" bgcolor="#e4f0f8" align="left"><a href="User guide4_1.html"><font face="arial" bgcolor="#e4f0f8" size="normal" underline="0" color="#000000">Setting defaults for one window</font></a></td>
52            <td width="20%" height="15" bgcolor="#e4f0f8" align="center"><a href="index.html"><font face="arial" bgcolor="#e4f0f8" size="normal" underline="0" color="#000000">[Top]</font></a></td>
53            <td width="40%" height="15" bgcolor="#e4f0f8" align="right"><a href="User guide5.html"><font face="arial" bgcolor="#e4f0f8" size="normal" underline="0" color="#000000">Advanced maneuvers with panels</font></a></td>
54            <td width="18" height="15" bgcolor="#e4f0f8" align="right"><a href="User guide5.html"><img src="images/rightarrow.png" border="0" alt="next page"/></a></td>
55         </tr>
56      </table>
57      <font face="Arial" bgcolor="#e4f0f8" size="normal" underline="0" color="#000000">&copy; 2011 The MathWorks Ltd</font>
58      <TT>&#149; </TT><a href="matlab: helpview([matlabroot,'/license.txt'])">Terms of Use</a>
59      <TT>&#149; </TT><a href="matlab: helpview([matlabroot,'/patents.txt'])">Patents</a>
60      <TT>&#149; </TT><a href="matlab: helpview([matlabroot,'/trademarks.txt'])">Trademarks</a>
61   
62   </body>
63</html>
64
65           
Note: See TracBrowser for help on using the repository browser.