Python Forum
listbox ipadx, ipady not working
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
listbox ipadx, ipady not working
#2
The padding is what you declare it as (run code below). You are possibly overlaying it with something else. You will have to comment lines in your complete program, and then run it, to see which line is the offender.
import tkinter as tk
from tkinter import ttk

class MyApp():
    def __init__(self, parent):
        self.parent = parent
        lb = tk.Listbox(self.parent, width=30, height=20)
        lb.grid(row=0, column=0, padx=5, pady=5, ipadx=5, ipady=5)
        for item in ["one", "two", "three", "four", "five"]:
            lb.insert("end", item)
        print(lb.grid_info())

if __name__ == "__main__":
    root = tk.Tk()
    MyApp(root)
    root.mainloop() 
Reply


Messages In This Thread
listbox ipadx, ipady not working - by maxtimbo - Feb-19-2019, 11:37 PM
RE: listbox ipadx, ipady not working - by woooee - Feb-19-2019, 11:55 PM
RE: listbox ipadx, ipady not working - by maxtimbo - Feb-20-2019, 09:44 PM
RE: listbox ipadx, ipady not working - by woooee - Feb-20-2019, 09:51 PM
RE: listbox ipadx, ipady not working - by wuf - Feb-22-2019, 07:46 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [PySimpleGUI] update listbox not working zappfinger 2 12,259 Nov-12-2018, 08:33 PM
Last Post: zappfinger

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020