Apr-02-2019, 08:45 PM
Hi DT2000
Please don't mix place with pack!!!. Does the following skript work better?:
Please don't mix place with pack!!!. Does the following skript work better?:
import tkinter as tk TEST_DATA = list_item_values = ["one", "two", "three", "four", "five"]*5 def getRecipe(event): print('Recipe') window_2 = tk.Tk() window_2.title("Listbox with internal border") main_frame = tk.Frame(window_2, bg='#FFD599', relief='sunken', bd=1) main_frame.pack(fill='both', expand=True, padx=10, pady=10) INTERIOR_BORDER = 10 output = tk.Listbox(main_frame, width=42, height=20, bd=0, highlightthickness=0, bg = '#FFD599', fg = '#9A0615', selectmode='single') output.pack(side='left', fill='both',expand=True, padx=INTERIOR_BORDER, pady=INTERIOR_BORDER) #output.place(x=210, y=195) output.insert('end', *list_item_values) yscroll1 = tk.Scrollbar(main_frame, command=output.yview, orient='vertical') yscroll1.pack(side='left', fill='y') #yscroll1.place(x=463, y=196) output.configure(yscrollcommand=yscroll1.set) output.bind('<ButtonRelease-1>', getRecipe) window_2.mainloop()wuf :-)