📄 13.html
字号:
<HTML><TITLE>Geometry Management</TITLE><BODY BGCOLOR="#FFF0E0" VLINK="#0FBD0F" TEXT="#101000" LINK="#0F0FDD">
<A NAME="top"><H1>Geometry Management</H1>
<P>
<I> Online chapter from <A HREF="javascript:if(confirm('http://www.mapfree.com/sbf/tcl/book/home.html \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.mapfree.com/sbf/tcl/book/home.html'" tppabs="http://www.mapfree.com/sbf/tcl/book/home.html">Tcl/Tk for Programmers</A> (with exercises and solutions).</I>
<P> Geometry management is defined above in
The Tk Way of Thinking. Review the concepts
of "master," "parent," "slave," and "child" there if necessary.
<P> Tk has three geometry managers: <TT>pack</TT>, <TT>grid</TT>, and <TT>place</TT>. Of
these, <TT>place</TT> is the easiest to understand and the hardest to use.
It is for those of you who want to do all your own geometry management work.
If this is your desire, read about <TT>place</TT> in the on-line manual. The other two
are covered here.
<P> Any widget whose geometry is managed by Tk (rather than by the window
manager) is a slave – there is some other window or widget of which
it is a part. As far as the examples in this book show, that widget
is both its master and its parent.
<P> A widget can be both a master and a slave. It can even be a master with
respect to one geometry manager and a slave with respect to another. It
cannot be a slave to two masters. Also, do not try to make a widget a master
with respect to two different geometry managers.
<P>
<DL><DD>
<STRONG>13.1 <A HREF="13.1.html" tppabs="http://www.mapfree.com/sbf/tcl/book/select/Html/13.1.html">The <TT>pack</TT> and <TT>grid</TT> Action Families</A></STRONG><BR>
<STRONG>13.2 <A HREF="13.2.html" tppabs="http://www.mapfree.com/sbf/tcl/book/select/Html/13.2.html">Slicing</A></STRONG><BR>
<STRONG>13.3 <A HREF="13.3.html" tppabs="http://www.mapfree.com/sbf/tcl/book/select/Html/13.3.html">Slicing for Size Changes</A></STRONG><BR>
<STRONG>13.4 <A HREF="13.4.html" tppabs="http://www.mapfree.com/sbf/tcl/book/select/Html/13.4.html">Padding</A></STRONG><BR>
<STRONG>13.5 <A HREF="13.5.html" tppabs="http://www.mapfree.com/sbf/tcl/book/select/Html/13.5.html">An Array of Cells</A></STRONG><BR>
<STRONG>13.6 <A HREF="13.6.html" tppabs="http://www.mapfree.com/sbf/tcl/book/select/Html/13.6.html">The Cavity</A></STRONG><BR>
<STRONG>13.7 <A HREF="13.7.html" tppabs="http://www.mapfree.com/sbf/tcl/book/select/Html/13.7.html">Placing Widgets more Carefully</A></STRONG><BR>
<STRONG>13.8 <A HREF="13.8.html" tppabs="http://www.mapfree.com/sbf/tcl/book/select/Html/13.8.html"><CITE>Tricks for Using Pack</CITE></A></STRONG><BR>
<STRONG>13.9 <A HREF="13.9.html" tppabs="http://www.mapfree.com/sbf/tcl/book/select/Html/13.9.html">Solutions to Exercises</A></STRONG><BR>
</DL>
<!-- Linkbar -->
<P><CENTER><FONT SIZE=2><NOBR>
<STRONG>Previous</STRONG>
<A HREF="12.html" tppabs="http://www.mapfree.com/sbf/tcl/book/select/Html/12.html">chapter</A><WBR>
<STRONG> | Next</STRONG>
<A HREF="14.html" tppabs="http://www.mapfree.com/sbf/tcl/book/select/Html/14.html">chapter</A><WBR>
<STRONG> | All</STRONG>
<A HREF="Contents.html" tppabs="http://www.mapfree.com/sbf/tcl/book/select/Html/Contents.html">chapters</A><WBR>
<STRONG> | Section</STRONG>
<A HREF="13.1.html" tppabs="http://www.mapfree.com/sbf/tcl/book/select/Html/13.1.html">one</A><P>
<STRONG>Related to</STRONG>
<A HREF="javascript:if(confirm('http://www.mapfree.com/sbf/home.html \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.mapfree.com/sbf/home.html'" tppabs="http://www.mapfree.com/sbf/home.html">Software Build and Fix</A><WBR>
<STRONG>| From</STRONG>
<A HREF="javascript:if(confirm('http://www.mapfree.com/sbf/tcl/home.html \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.mapfree.com/sbf/tcl/home.html'" tppabs="http://www.mapfree.com/sbf/tcl/home.html">Zimmer's Tcl/Tk Page</A><WBR>
<STRONG>| Author</STRONG>
<A HREF="javascript:if(confirm('http://www.mapfree.com/mp/jaz/home.html \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.mapfree.com/mp/jaz/home.html'" tppabs="http://www.mapfree.com/mp/jaz/home.html">J. A. Zimmer</A><WBR>
<STRONG>| Copyright</STRONG>
<A HREF="copyright.html" tppabs="http://www.mapfree.com/sbf/tcl/book/select/Html/copyright.html">Notice</A>
<P>
<I>Jun 17, 1998</I>
</NOBR></FONT></CENTER></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -