📄 slide020.html
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="blendTrans(Duration=2)" http-equiv="Page-Enter">
<title>Big C++: Chptr. 27 -- Graphical User Interfaces</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Copyright" content="2005 John Wiley & Sons">
<meta name="Author" content="Kurt Schmidt">
</head>
<body>
<div onclick="document.location='slide021.html'">
<h2><font color='#009999'>27.6 Layout Management (cont.)</font></h2>
<ul>
<li><font size="+1">You must include commands to turn on auto layout and tell
the frame which sizer to use.
<blockquote>
<pre>SetAutoLayout(true);
SetSizer(frame_sizer);</pre>
</blockquote></font></li>
<li><font size="+1">The additional parameters in the <tt>Add</tt> function explain
how the layout is maintained when the user resizes.
<blockquote>
<pre>wxBoxSizer* frame_sizer = new wxBoxSizer(wxVERTICAL);
frame_sizer->Add(text, 1, wxGROW);
frame_sizer->Add(button_sizer, 0, wxALIGN_CENTER);</pre>
</blockquote></font></li>
<li><font size="+1">The second parameter indicates the ratio of size used in
vertical components.</font>
<ul>
<li><font size="+1">0 means don't resize.</font></li>
<li><font size="+1">If you had a component with parameter 1, and another
with parameter 2, the second would always use twice as much (vertical)
space as the first.</font></li>
</ul>
</li>
<li><font size="+1">The third parameter describes horizontal growth behavior.</font>
<ul>
<li><font size="+1">The text control grows with the window.</font></li>
<li><font size="+1">The button bar doesn't grow, but should be centered.</font></li>
</ul>
</li>
</ul>
<hr>
<center><small>
<a href='slide019.html'>prev</a>
|<a href='slide001.html'>top</a>
|<a href='slide021.html'>next</a>
</small></center>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -