[Python-checkins] r63527 - sandbox/trunk/ttk-gsoc/Doc/library/ttk.rst
guilherme.polo
python-checkins at python.org
Thu May 22 00:30:20 CEST 2008
Author: guilherme.polo
Date: Thu May 22 00:30:20 2008
New Revision: 63527
Log:
Moved back tkinter to Tkinter as it will remain the "default" module for 2.6
Modified:
sandbox/trunk/ttk-gsoc/Doc/library/ttk.rst
Modified: sandbox/trunk/ttk-gsoc/Doc/library/ttk.rst
==============================================================================
--- sandbox/trunk/ttk-gsoc/Doc/library/ttk.rst (original)
+++ sandbox/trunk/ttk-gsoc/Doc/library/ttk.rst Thu May 22 00:30:20 2008
@@ -34,11 +34,11 @@
But if you already have some code that does::
- from tkinter import *
+ from Tkinter import *
You may optionally want to use::
- from tkinter import *
+ from Tkinter import *
from ttk import *
And then several :mod:`ttk` widgets (:class:`Button`, :class:`Entry`,
@@ -70,8 +70,8 @@
Tk code::
- l1 = tkinter.Label(text="Test", fg="black", bg="white")
- l2 = tkinter.Label(text="Test", fg="black", bg="white")
+ l1 = Tkinter.Label(text="Test", fg="black", bg="white")
+ l2 = Tkinter.Label(text="Test", fg="black", bg="white")
Ttk code::
@@ -242,7 +242,7 @@
^^^^^^^^^^
Besides the methods described below, the class :class:`ttk.Widget` supports the
-methods :meth:`tkinter.Widget.cget` and :meth:`tkinter.Widget.configure`.
+methods :meth:`Tkinter.Widget.cget` and :meth:`Tkinter.Widget.configure`.
.. class:: Widget
@@ -318,7 +318,7 @@
| textvariable | Specifies a name whose value is linked to the widget |
| | value. Whenever the value associated with that name |
| | changes, the widget value is updated, and vice versa. |
- | | See :class:`tkinter.StringVar`. |
+ | | See :class:`Tkinter.StringVar`. |
+-----------------+--------------------------------------------------------+
| values | Specifies the list of values to display in the |
| | drop-down listbox. |
@@ -1102,9 +1102,9 @@
some padding and a different background color you could do::
import ttk
- import tkinter
+ import Tkinter
- root = tkinter.Tk()
+ root = Tkinter.Tk()
ttk.Style().configure("TButton", padding=6, relief="flat",
background="#ccc")
@@ -1125,10 +1125,10 @@
An example may make it more understandable::
- import tkinter
+ import Tkinter
import ttk
- root = tkinter.Tk()
+ root = Tkinter.Tk()
style = ttk.Style()
style.map("C.TButton",
@@ -1272,9 +1272,9 @@
As an example, lets change the Combobox for the default theme a bit::
import ttk
- import tkinter
+ import Tkinter
- root = tkinter.Tk()
+ root = Tkinter.Tk()
style = ttk.Style()
style.theme_settings("default", {
More information about the Python-checkins
mailing list