New submission from 
                                        Hirokazu Yamamoto
                                :

Attached code "test_tixGrid.py" fails with following error message.

TypeError: yview() takes exactly 1 argument (4 given)

----------
components: Tkinter
files: test_tixGrid.py
messages: 55762
nosy: ocean-city
severity: normal
status: open
title: xview/yview of Tix.Grid is broken
type: behavior
versions: Python 2.5

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1135>
__________________________________
import Tkinter as Tk

def scrollable(Widget, master, *a, **kw):

	frame = Tk.Frame(master)
	frame.grid_columnconfigure(0, weight=1)
	frame.grid_rowconfigure(0, weight=1)

	widget = Widget(frame, *a, **kw)
	widget.grid(row=0, column=0, sticky="news")

	scroll_x = Tk.Scrollbar(frame, command=widget.xview, orient=Tk.HORIZONTAL)
	scroll_x.grid(row=1, column=0, sticky="news")

	scroll_y = Tk.Scrollbar(frame, command=widget.yview, orient=Tk.VERTICAL)
	scroll_y.grid(row=0, column=1, sticky="news")

	widget.configure(xscrollcommand=scroll_x.set, yscrollcommand=scroll_y.set)

	for name in ("pack", "grid", "place"):
		setattr(widget, name, getattr(frame, name))

	return widget

import Tix

root = Tix.Tk()
grid = scrollable(Tix.Grid, root)
grid.pack(fill=Tix.BOTH, expand=True)
for y in xrange(30):
	for x in xrange(6):
		grid.set(x, y, text=repr((x, y)))
root.mainloop()
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to