Hi,
I am asking here three question together rather than making separate threads for each question.
I am making an application where I can load images in a canvas. I load the image with file menu askopenfilename dialog box. Something like this:
class MyApp(object):
def __init__(self, master):
frame = tk.Frame(master)
frame.pack()
self.canvas = tk.Canvas(width=520, height=350)
self.canvas.pack(side=BOTTOM)
self.canvas.config(borderwidth=1, bg='black')
menu = tk.Menu(master)
root.config(menu=menu)
# File menu
filemenu = tk.Menu(menu, tearoff=0)
menu.add_cascade(label="File", menu=filemenu)
filemenu.add_command(label="New Ctrl+N", command=self.new_file)
filemenu.add_command(label="Open... Ctrl+O", command=self.file_open)
1/ could someone kindly show me how to move that image with mouse. First, select the image and than drag and drop on the canvas?
2/ When i load the second image, it deletes the first image. I want to know how to over load images one by one and than select them individually?
3/ How to center the canvas?
Thanks
Regards