📄 slide017.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='slide018.html'">
<h2><font color='#009999'>27.6 Layout Management</font></h2>
<ul>
<li><font size="+1">The next sample program uses buttons instead of menus.</font></li>
<li><font size="+1">Each button has an ID, and the event table matches the ID
with a function.
<blockquote>
<pre>BEGIN_EVENT_TABLE(ButtonFrame, wxFrame)
EVT_BUTTON(IS_SAY_HELLO, ButtonFrame::OnSayHello)
END_EVENT_TABLE()</pre>
</blockquote>
</font></li>
<li><font size="+1">When you construct a button, you specify the parent window,
the button ID, and the button label.
<blockquote>
<pre>wxButton* hello_button = new wxButton(this,
IS_SAY_HELLO, "Say Hello");</pre>
</blockquote>
</font> </li>
<li><font size="+1">The event handler has the same form as the menu event handler.
<blockquote>
<pre>void ButtonFrame::OnSayHello(wxCommandEvent& event)
{
text->AppendText("Hello, World!\n");
}</pre>
</blockquote>
</font> </li>
</ul>
<hr>
<center><small>
<a href='slide016.html'>prev</a>
|<a href='slide001.html'>top</a>
|<a href='slide018.html'>next</a>
</small></center>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -