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

📄 116.html

📁 Tcl 语言的入门级图书
💻 HTML
字号:
<HTML><TITLE>Overview of Tk: Multiplatform Caveat</TITLE><BODY BGCOLOR="#FFF0E0" VLINK="#0FBD0F" TEXT="#101000" LINK="#0F0FDD">
<A NAME="top"><H1>Multiplatform Caveat</H1></A>


<P>  As with the Tcl scripts, the Tk examples in this book have been tested on my
two computers, one running Unix with X Windows and the other running Windows
95.  As with the Tcl scripts, they run both places.  However, several of them
do not look the same on the screens of both windowing systems.

<P>  When I started this project, I thought the best way to proceed would be to
set up all my displays using millimeters.  After all, the number of pixels we
get on our screens keeps going up but the size of a millimeter remains
constant.  Sure, Tk's idea of how big a millimeter is in the x or y direction
is going to be inaccurate but, if the window is a little large or too small,
so what?

<P>   This was naive. Tk's inaccurate idea of a millimeter can make a window too
small to fill the minimum size in the Windows implementatation or too large to
fit on a screen.  In retrospect, this is not very surprising.  Simply changing
the screen driver can affect the accuracy of Tk's idea of a millimeter.  Given
the range of screen display possibilities, how could Tk be anywhere near close
to the right value?

<P>   One conclusion from this discussion is that you may need to adjust
the dimensions in some examples and exercises for use on your platform. 

<P>   Another conclusion is that applications that will run on multiple platforms
need some adaptive mechanism beyond what most examples in this book show.

<P>  An initialization process that determines two constants, <TT>X_Pixels</TT> (the
number of pixels in a horizontal millimeter) and <TT>Y_Pixels</TT> (the number of
pixels in a vertical millimeter), could be the basis for this adaptive
mechanism.  With these constants you could design your widgets in millimeters
with the expectation that actual images would be close to your designs.  One
way to obtain approximations for these two constants is suggested in
Exercise 
<A HREF="javascript:if(confirm('http://www.mapfree.com/sbf/tcl/book/select/Html/15.11.html  \n\nThis file was not retrieved by Teleport Pro, because it was unavailable, or its retrieval was aborted, or the project was stopped too soon.  \n\nDo you want to open it from the server?'))window.location='http://www.mapfree.com/sbf/tcl/book/select/Html/15.11.html#15.11b'" tppabs="http://www.mapfree.com/sbf/tcl/book/select/Html/15.11.html#15.11b">15.11b</A>.

<P>  On similar topics, be advised that some of the figures may appear in
different sizes in this book than what you see on your screen.  Also, be aware
that you need not take exercises that specify exact sizes for widgets too
seriously &#150; use the suggested dimensions but do not worry if the result is a
different size on your screen.


<!-- Linkbar -->
<P><CENTER><FONT SIZE=2><NOBR>
<STRONG>From</STRONG>
<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><WBR>
<STRONG>Previous</STRONG>
<A HREF="11.5.html" tppabs="http://www.mapfree.com/sbf/tcl/book/select/Html/11.5.html">section</A><WBR>
<STRONG>Next</STRONG>
<A HREF="11.7.html" tppabs="http://www.mapfree.com/sbf/tcl/book/select/Html/11.7.html">section</A><WBR>
<STRONG>All</STRONG>
<A HREF="11.html" tppabs="http://www.mapfree.com/sbf/tcl/book/select/Html/11.html">sections</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><WBR>
<P>
<I>Jun 17, 1998</I>
 </NOBR></FONT></CENTER></BODY></HTML>


⌨️ 快捷键说明

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