NFLmusic库文件

This commit is contained in:
2025-01-23 16:47:37 +08:00
parent 7516e1c95d
commit 9b3f1d1654
54 changed files with 3763 additions and 0 deletions

21
nflmusic/label_button.py Normal file
View File

@ -0,0 +1,21 @@
from tkinter import Label, ttk
Button = ttk.Button
Label = ttk.Label
class LabelButton:
def __init__(self, pack_box, label, button, command):
self.pack_box = pack_box
self.label_text = label
self.button_text = button
self.click_event = command
self.button = Button(self.pack_box, text=self.button_text, command=command, style='info.Link.TButton')
self.label = Label(self.pack_box, text=self.label_text)
def place(self, button, label):
self.button.place(x=button[0], y=button[1])
self.label.place(x=label[0], y=label[1])
def place_forget(self):
self.button.place_forget()
self.label.place_forget()