

何故エラーになるのかわかりません。

**エラーメッセージ:**

[code]

    AttributeError                            Traceback (most recent call last)
    ~\AppData\Local\Temp/ipykernel_28456/666825894.py in <module>
         26 txtbox = tk.Text(frame,width = 60,height = 20)
         27 
    ---> 28 yscroll = tk.Scrollber(frame, orient = tk.VERTICAL,command = txtbox.yview)
         29 
         30 txtbox['yscrollcommand'] = yscroll.set
    
    AttributeError: module 'tkinter' has no attribute 'Scrollber'
    
[/code]

**ソースコード:**

[code]

    import tkinter as tk
    from tkinter import ttk
    
    
    def sub_window():
        mini_window = tk.Toplevel(root)
        
        button2 = tk.Button(mini_window, text = 'Push2')
        button2.pack(padx = 50, pady = 25)
        
    
        mini_window = tk.Toplevel(root)
        
        button2 = tk.Button(mini_window, text = 'Push3')
        button2.pack(padx = 50, pady = 25)
    
    
    root =tk.Tk()
    
    button2 = tk.Button(root, text = 'Push1', command = sub_window)
    button2.pack(padx = 50, pady = 25)
    
    frame = ttk.Frame(root,padding = 5)
    frame.pack(padx = 5,pady = 5)
    
    txtbox = tk.Text(frame,width = 60,height = 20)
    
    yscroll = tk.Scrollber(frame, orient = tk.VERTICAL,command = txtbox.yview)**
    
    txtbox['yscrollcommand'] = yscroll.set
    
    yscroll.pack(side =tk.RIGHT,fill = tk.Y)
    
    
    
    txtbox.pack()
    
    root.mainloop()
    
[/code]


CC BY-SA 4.0
2022-01-23T02:25:35.197
85870
2022-01-23T04:00:43.370
2022-01-23T04:00:43.370
3060
51045
question
python
スクロールバーを使用しようとすると、エラーになります。 AttributeError: module 'tkinter' has no attribute 'Scrollber'