En mi carpeta hay dos modulos (main,system_info)
desde el modulo main mando a ejecutar el modulo system_info
pero cuando el programa ejecuta el modulo system_info se ejecuta bien, pero la primera imagen que quiero mostrar no se muestra y no se muestra tampoco ninguno de los labels que le siguen (Y la ventana anterior no se destruye como indique en el modulo system_info mas adelante)
Tal que asi:
Pero, su ejecuto el modulo system_info en sí se muestra correctamente
Dejo codigo mas importante
(Revisado)
main:
def destroyright(event):
rightclick.destroy()
info_sys.destroy()
arrow.destroy()
background.bind("<Button-3>",right_click)
def info(event):
import system_info
exec("system_info")
def right_click(event):
global rightclick
global info_sys
global arrow
rightclick=Frame(root,bg="white",width=300,height=350)
rightclick.place(x=x_mouse+1,y=y_mouse+1)
background.unbind("<Button-3>")
background.bind("<Button-1>",destroyright)
info_sys=Label(root,text="Informacion del sistema",bg="white")
info_sys.place(x=x_mouse+20,y=y_mouse+10)
arrow=Label(root,text="►",bg="white")
arrow.place(x=x_mouse+280,y=y_mouse+10)
info_sys.bind("<Button-1>",info)
background.bind("<Button-3>",right_click)
background.bind("<Motion>",Motion)
system_info:
from tkinter import *
import platform
from typing import TYPE_CHECKING
if TYPE_CHECKING:
import main
main.root.destroy()
syst=platform.system()
info=Tk()
info.attributes("-fullscreen",True)
systemVersion="Pre-Alpha 0.1"
infoFrame=Frame(info,bg="orange",width=9999999,height=9999999)
infoFrame.place(x=0,y=0)
TclLabel=Label(info,text=f"Tcl/Tk Version: {TclVersion}")
TclLabel.place(x=50,y=50)
TkIconPhoto=PhotoImage(file="C:/ProgramData/sysadro/bin/icons/tk.sadroimage")
TkIcon=Label(info,image=TkIconPhoto,bg="orange")
TkIcon.place(x=160,y=45)
SystemLabel=Label(info,text=f"SaDro Version: {systemVersion}")
SystemLabel.place(x=50,y=100)
SystemIconPhoto=PhotoImage(file="C:/ProgramData/sysadro/bin/icons/sadro/sadro64.sadroimage")
SystemIcon=Label(info,image=SystemIconPhoto,bg="orange")
SystemIcon.place(x=230,y=76)
operatingSystem=Label(info,text=f"Sistema operativo : {syst}")
operatingSystem.place(x=50,y=150)
taskbar=Frame(info,bg="violet",width=9999,height=50)
taskbar.place(x=0,y=info.winfo_screenheight()-50)
task_sadro=PhotoImage(file="C:/ProgramData/sysadro/bin/icons/taskbar/sadro_s.sadroimage")
task_sadro_1=Label(info,image=task_sadro,bg="violet")
task_sadro_1.place(x=15,y=info.winfo_screenheight()-47)
info.mainloop()
def info(event): root.destroy(); import system_info; exec("system_info")