ich hab probleme mit mmeinen buttons. Sie werden einfach nicht mitgescrallt. Kann mit jmd helfen?
Hier ein bisschen Code:
Code: Alles auswählen
import tkinter as tk
from tkinter import *
master = Tk()
ws = master.winfo_screenwidth()
hs = master.winfo_screenheight()
width = 1500
height = 600
frame=Frame(master, width = ws, height = hs)
frame.grid(row=0,column=0)
w = Canvas(frame, width=width, height=height)
if width > ws:
w.config(width = ws, scrollregion=(0, 0, width, height))
hbar = Scrollbar(frame, orient=HORIZONTAL)
hbar.pack(side = BOTTOM,fill=X)
hbar.config(command = w.xview)
w.config(xscrollcommand=hbar.set)
w.pack()
master.geometry('+%d+%d' % (0, 0))
info_button1 = tk.Button(w, text = 'test1', command = print())
info_button1.place(x = 20, y = 20, height = 100, width = 200)
w.create_line(220, 70, 600, 70, arrow=tk.LAST)
info_button1 = tk.Button(w, text = 'test1', command = print())
info_button1.place(x = 600, y = 20, height = 100, width = 200)
w.create_line(800, 70, 1400, 70, arrow=tk.LAST)
mainloop()
