]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Document that images go away when they go away. Fixes #632323.
authorMartin v. Löwis <martin@v.loewis.de>
Tue, 5 Nov 2002 22:11:50 +0000 (22:11 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Tue, 5 Nov 2002 22:11:50 +0000 (22:11 +0000)
Doc/lib/tkinter.tex

index 8bb59d5d7c289a35f9d233bfc78150306600c436..e577b28a6c184922d65314778e197ac406ca88d9 100644 (file)
@@ -881,6 +881,24 @@ that matches for menu items labelled \code{last}, \code{active}, or
 \end{itemize}
 \end{description}
 
+\subsubsection{Images}
+
+Bitmap/Pixelmap images can be created through the subclasses of
+\class{Tkinter.Image}:
+
+\begin{itemize}
+\item  \class{BitmapImage} can be used for X11 bitmap data.
+\item  \class{PhotoImage} can be used for GIF and PPM/PGM color bitmaps.
+\end{itemize}
+
+Either type of image is created through either the \code{file} or the
+\code{data} option (other options are available as well).
+
+The image object can then be used whereever an \code{image} option is
+supported by some widget (e.g. labels, buttons, menus). In these
+cases, Tk will not keep a reference to the image. When the last Python
+reference to the image object is deleted, the image data is deleted as
+well, and Tk will display an empty box wheerever the image was used.
 
 \section{\module{Tix} ---
          Extension widgets for Tk}