dannylynncole / python-ttk

Automatically exported from code.google.com/p/python-ttk
0 stars 0 forks source link

Scrollbars 'moveto' #8

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
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.

Original issue reported on code.google.com by handja...@gmail.com on 17 Feb 2009 at 2:17

GoogleCodeExporter commented 8 years ago
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 ?

Original comment by ggpolo on 18 Feb 2009 at 9:21