Export to GitHub

python-ttk - issue #8

Scrollbars 'moveto'


Posted on Feb 17, 2009 by Massive Wombat

What steps will reproduce the problem? 1. create canvas 2. create scrollbars 2. create an image in canvas 3. dragging bars

What is the expected output? What do you see instead? canvas.xview and .yview doesen't run dragging scrollbars

File "/usr/lib/python2.5/lib-tk/Tkinter.py", line 2327, in yview self.tk.call((self._w, "yview") + args) TclError: expected floating-point number but got "0,44444566339.0"

What version of the product are you using? On what operating system? Python 2.5 with Tile last ttk and ubuntu 8.10

Please provide any additional information below.

Comment #1

Posted on Feb 18, 2009 by Quick Horse

I tried reproducing the problem without doing anything fancy but didn't hit the problem. Here is the actual code that I used:

{{{ import Tkinter import ttk

root = Tkinter.Tk()

canvas = Tkinter.Canvas(scrollregion=(0, 0, 400, 400)) vbar = ttk.Scrollbar(orient='vertical', command=canvas.yview) hbar = ttk.Scrollbar(orient='horizontal', command=canvas.xview) canvas.configure(xscrollcommand=hbar.set, yscrollcommand=vbar.set) vbar.pack(side='right', fill='y') hbar.pack(side='bottom', fill='x') canvas.pack(fill='both', expand=True)

Change the following to use an image you have over there

img = Tkinter.PhotoImage(file='box1.gif') canvas.create_image(250, 250, image=img)

root.mainloop() }}}

Can you include a sample that demonstrates the problem ?

Status: New

Labels:
Type-Defect Priority-Medium