[Python-checkins] r63398 - in sandbox/trunk/ttk-gsoc: Lib/lib-tk/Ttk.py src src/2.x src/3.x
guilherme.polo
python-checkins at python.org
Sat May 17 03:35:16 CEST 2008
Author: guilherme.polo
Date: Sat May 17 03:35:15 2008
New Revision: 63398
Log:
Removed a XXX comment at Treeview which could confuse people not aware
of tk's treeview commands.
Changed methods identify_something and selection_something to rely on
their identify and selection methods respectively.
Added:
sandbox/trunk/ttk-gsoc/src/
sandbox/trunk/ttk-gsoc/src/2.x/
sandbox/trunk/ttk-gsoc/src/3.x/
Modified:
sandbox/trunk/ttk-gsoc/Lib/lib-tk/Ttk.py
Modified: sandbox/trunk/ttk-gsoc/Lib/lib-tk/Ttk.py
==============================================================================
--- sandbox/trunk/ttk-gsoc/Lib/lib-tk/Ttk.py (original)
+++ sandbox/trunk/ttk-gsoc/Lib/lib-tk/Ttk.py Sat May 17 03:35:15 2008
@@ -1037,10 +1037,6 @@
return self.tk.call(self._w, "bbox", item, column)
- # XXX Treeview has a command named "children", but it conflicts with
- # Tkinter.Tk.children. I've renamed and split "children" into
- # get_children and set_children
-
def get_children(self, item):
"""Returns a tuple of children belonging to item."""
return self.tk.call(self._w, "children", item)
@@ -1121,14 +1117,14 @@
def identify_row(self, y):
"""Returns the item ID of the item at position y."""
- return self.tk.call(self._w, "identify", "row", 0, y)
+ return self.identify("row", 0, y)
def identify_column(self, x):
"""Returns the data column identifier of the cell at position x.
The tree column has ID #0."""
- return self.tk.call(self._w, "identify", "column", x, 0)
+ return self.identify("column", x, 0)
def index(self, item):
@@ -1220,22 +1216,22 @@
def selection_set(self, items):
"""items becomes the new selection."""
- self.tk.call(self._w, "selection", "set", items)
+ self.selection("set", items)
def selection_add(self, items):
"""Add items to the selection."""
- self.tk.call(self._w, "selection", "add", items)
+ self.selection("add", items)
def selection_remove(self, items):
"""Remove items from the selection."""
- self.tk.call(self._w, "selection", "remove", items)
+ self.selection("remove", items)
def selection_toggle(self, items):
"""Toggle the selection state of each item in items."""
- self.tk.call(self._w, "selection", "toggle", items)
+ self.selection("toggle", items)
def set(self, item, column=None, value=None):
More information about the Python-checkins
mailing list