⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 slide008.html

📁 《Big C++ 》Third Edition电子书和代码全集-Part1
💻 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='slide009.html'">
<h2><font color='#009999'>27.3 Adding a Text Control to the Frame</font></h2>
<ul>
  <li><font size="+1">Again, we use inheritance to define our own, more interesting, 
    type of frame.</font></li>
  <li><font size="+1">This frame contains a text area into which users can type 
    any text.</font><font size="+1"> 
    <blockquote> 
      <pre>class TextFrame : public wxFrame
{
public:
   TextFrame();
private:
   wxTextCtrl* text;
};</pre>
    </blockquote>
    </font></li>
  <li><font size="+1">The constructor initializes the base class and the text 
    control: 
    <blockquote> 
      <pre>TextFrame::TextFrame()
   : wxFrame(NULL, -1, &quot;TextFrame&quot;)
{
   text = new wxTextCtrl(this, -1, &quot;Type some text here!&quot;,
      wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE);
}</pre>
    </blockquote>
    </font></li>
  <li><font size="+1">Note that first parameter (<tt>this</tt>) indicates that 
    the parent of the text control is this frame.</font> </li>
  <li><font size="+1">The next two parameters indicate a default window ID and 
    initial contents of the text control.</font></li>
  <li><font size="+1">The next two parameters indicate default size and position.</font></li>
  <li><font size="+1">The final parameter turns on the &quot;multiline&quot; style, 
    which allows the text control to hold multiple lines of text.</font></li>
</ul>
<hr>
<center><small>
	<a href='slide007.html'>prev</a>
	|<a href='slide001.html'>top</a>
	|<a href='slide009.html'>next</a>
</small></center>
</div>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -