def mostrar_nombre(pestaña, event):
listbox = event.widget
import indextkinter =as listbox.curselection()tk
from valuetkinter =import listbox.get(index[0])ttk
if pestaña == limit_before:
limit_before_list[0]limit_before_list = pestaña[0]
limit_before_list[1]max_posts_list = value[0]
elif pestañamax_comments_list === max_posts:[0]
max_posts_list[0]limit_before = pestaña'limit_before'
max_posts_list[1]max_posts = value'max_posts'
elif pestaña == max_comments:
max_comments_list[0] = pestaña'max_comments'
max_comments_list[1] = value
elif pestaña ==
def IWantRetweetsmostrar_nombre(event):
IWantRetweets_list[0]listbox = pestañaevent.widget
IWantRetweets_list[1]index = value
else:
print('Algo paso')
def conf_createlistbox.curselection():
global limit_before_list, max_posts_list, max_comments_list, IWantRetweets_list
limit_before_listvalue = [0, 0]listbox.get(index[0])
max_posts_list = [0, 0]
print(pestaña) # Aca max_comments_listesta =mi [0problema, 0]
me IWantRetweets_listdevuelve =la [0,ultima 0]ingresada
note = ttk.Notebookprint(ventanavalue)
pestañas = {
limit_before: list(range(0, 160, 10)),
max_posts: list(range(0, 410, 10)),
max_comments: list(range(0, 4100, 100)),
IWantRetweets: ['true', 'false']
}
note = ttk.Notebook()
for pestaña, items in pestañas.items():
frame = ttk.Frame(note)
note.add(frame, text=pestaña)
listbox = tk.Listbox(frame, exportselection=False)
listbox.grid(row=0, column=0)
listbox.bind(
"<<ListboxSelect>>",
functools.partial(
mostrar_nombre,
pestaña
)
)
for item in items:
listbox.insert(tk.END, item)
tab4 = Button(note, text="DONE?", command=note.destroy)
note.addpack(tab4, text="DONE")
note.packmainloop(side="top", fill="both", expand=True)