216.html

来自「Python Ebook Python&XML」· HTML 代码 · 共 109 行

HTML
109
字号

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Robots" content="INDEX,NOFOLLOW">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<TITLE>Safari | Python Developer's Handbook -&gt; Summary</TITLE>
<LINK REL="stylesheet" HREF="oreillyi/oreillyN.css">
</HEAD>
<BODY bgcolor="white" text="black" link="#990000" vlink="#990000" alink="#990000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

<table width="100%" cellpadding=5 cellspacing=0 border=0 class="navtopbg"><tr><td><font size="1"><p class="navtitle"><a href="8.html" class="navtitle">Web Development</a> &gt; <a href="0672319942.html" class="navtitle">Python Developer's Handbook</a> &gt; <a href="206.html" class="navtitle">15. Tkinter</a> &gt; <span class="nonavtitle">Summary</span></p></font></td><td align="right" valign="top" nowrap><font size="1"><a href="main.asp?list" class="safnavoff">See All Titles</a></font></td></tr></table>
<TABLE width=100% bgcolor=white border=0 cellspacing=0 cellpadding=5><TR><TD>
<TABLE border=0 width="100%" cellspacing=0 cellpadding=0><TR><td align=left width="15%" class="headingsubbarbg"><a href="215.html" title="Tkinter Resources"><font size="1">&lt;&nbsp;BACK</font></a></td><td align=center width="70%" class="headingsubbarbg"><font size="1"><a href="popanote.asp?pubui=oreilly&bookname=0672319942&snode=216" target="_blank" title="Make a public or private annnotation">Make Note</a> | <a href="216.html" title="Use a Safari bookmark to remember this section">Bookmark</a></font></td><td align=right width="15%" class="headingsubbarbg"><a href="218.html" title="Chapter"><font size="1">CONTINUE&nbsp;&gt;</font></a></td></TR></TABLE>
<a href="5%2F31%2F2002+4%3A50%3A40+PM.html" TABINDEX="-1"><img src=images/spacer.gif border=0 width=1 height=1></a><font color=white size=1>152015024128143245168232148039199167010047123209178152124239215162149150217129135121220044</font><a href="read7.asp?bookname=0672319942&snode=216&now=5%2F31%2F2002+4%3A50%3A40+PM" TABINDEX="-1"><img src=images/spacer.gif border=0 width=1 height=1></a><br>
<FONT>
				<h3>



Summary</h3>
				<p>Tk is a popular and endorsed toolkit that can handle windows, GUI events, and user interactions. Tkinter is Python's cross-platform interface to the Tk GUI toolkit that enables you to handle buttons and windows, and define their properties at a glance. The typical Tkinter distribution contains a basic set of 15 widgets, and some extra classes that can be used by your GUI applications.</p>

				<BLOCkquoTE>
<P>
						<P>Button桾his widget defines a clickable button that can execute a specific operation when clicked.</p>

					</p>
<p>
						<p>Canvas桾his widget is used to draw graphs, lines, polygons, and all other types of graphic elements.</P>

					</P>
<P>
						<P>Checkbutton桾his widget exposes a button that controls a variable that can have two distinct values.</p>

					</p>
<p>
						<p>Entry桾his widget implements a simple text entry field.</p>

					</p>
<p>
						<p>Frame桾his widget works like a container for other widgets when creating a complex layout within a window.</p>

					</p>
<p>
						<p>Label桾his widget handles the exhibition of a text or an image.</p>

					</p>
<p>
						<p>Listbox桾his widget displays a list of possible selections.</p>

					</p>
<p>
						<p>Menu桾his widget is used to implement pull-down and pop-up menus.</P>

					</p>
<p>
						<P>Menubutton桾his widget is used to implement pull-down menus.</p>

					</p>
<p>
						<P>Message桾his widget displays a text message in a way similar to the label widget, but using powerful formatting capabilities.</p>

					</p>
<p>
						<p>Radiobutton桾his widget is associated with a variable, and when clicked, the variable assumes its value.</P>

					</p>
<p>
						<p>Scale桾his widget provides a slider that helps you set the value of a numerical variable.</P>

					</P>
<P>
						<P>Scrollbar桾his widget implements standard scrollbars that you can use along with other widgets, such as listbox, canvas, entry, and text.</p>

					</p>
<p>
						<p>Text桾his widget display text that you can edit and format.</P>

					</P>
<P>
						<P>Toplevel桾his widget is another container widget, just like the frame widget.</p>

					</p>
</blOCKQuote>
				<P>Tkinter also provides the <TT Class="monofont">Image</tt> class. This class is used as a foundation to display graphic objects, including bitmaps and GIF images. Two subclasses are inherited from this class: <tt class="monofont">BitmapImage</tt> and <tt claSs="monofont">PhotoImage.</tT>
				</p>

				<p>All these Tkinter widgets have access to specific geometry management methods, which have the purpose of organizing them throughout the parent widget area. These methods are grouped in three distinct classes that provide a nice way to lay out child widgets in their parent widget. Tkinter exposes the following geometry manager classes: <tT clasS="monofont">pack,</tt>
					<tT CLAss="monofont">grid,</tt> and <TT CLass="monofont">place.</tT>
				</P>

				<P>Tkinter also allows you to create event bindings for every specific object, and after binding an event to a widget, you can specify which function should be called at the time the event occurs. This function (or method) is called callback.</P>

				<p>To complement Tkinter, you can also use the Python Mega Widgets. PMW is a toolkit for building high-level widgets in Python using the Tkinter module that provides many interesting and complex widgets.</p>

			</foNT>
<P><TABLE width="100%" border=0><TR valign="top"><TD><font size=1 color="#C0C0C0"><br></font></TD><TD align=right><font size=1 color="#C0C0C0">Last updated on 1/30/2002<br>Python Developer's Handbook, &copy;&nbsp;2002 Sams Publishing</font></TD></TR></TABLE></P>
<TABLE border=0 width="100%" cellspacing=0 cellpadding=0><TR><td align=left width="15%" class="headingsubbarbg"><a href="215.html" title="Tkinter Resources"><font size="1">&lt;&nbsp;BACK</font></a></td><td align=center width="70%" class="headingsubbarbg"><font size="1"><a href="popanote.asp?pubui=oreilly&bookname=0672319942&snode=216" target="_blank" title="Make a public or private annnotation">Make Note</a> | <a href="216.html" title="Use a Safari bookmark to remember this section">Bookmark</a></font></td><td align=right width="15%" class="headingsubbarbg"><a href="218.html" title="Chapter"><font size="1">CONTINUE&nbsp;&gt;</font></a></td></TR></TABLE>
</TD></TR></TABLE>




<!--EndOfBrowse-->

</TD></TR></TABLE>
<table width=100% border=0 cellspacing=0 cellpadding=0 bgcolor=#990000><tr><td><p align=center><font size=1 face="verdana,arial,helvetica" color=white>

⌨️ 快捷键说明

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