Si pudieran ayudarme por favor, no logro unir las dos ventanas que estoy realizando
Publicado por sebastian (4 intervenciones) el 02/11/2021 01:09:36
import tkinter.ttk
from tkinter import *
from tkinter import messagebox as MessageBox
global ventana0
from PIL import ImageTk, Image
ventana0 = Tk()
ventana0.geometry("650x550")
username_label = Label(text=" Bienvenido a SebasCorp.Presione siguinete para ingresar al registro de datos ")
username_label.place(x=315, y=70)
username_label.place(x=140, y=350)
v2= ventana
submit_btn = Button(ventana0, text="Siguiente", width="30", height="2", bg="#00CD63",command =v2)
submit_btn.place(x=400, y=500)
imagen = ImageTk.PhotoImage(Image.open(r'C:\Users\Sebastian\PycharmProjects\pythonProject\Sebascorp0.png'))
label = Label(image=imagen)
label.pack()
label.place(x=90, y=100)
ventana0.mainloop()
def emergente():
usu=username.get()
sIndex = password.get()
lis = lstDesplegable.get()
cadena = ("USUARIO:", usu ) + ( "Contraseña:", sIndex)+ ( "Rol:", lis)
MessageBox.showinfo("Valores ingresados", cadena)
def v2 () :
ventana = Tk()
ventana.geometry("650x550")
ventana.title("BIENVENIDO")
ventana.resizable(False, False)
ventana.config(background="#273746")
main_title = Label(text = " BIENVENIDO ", font = ("Cambria", 21), bg ="#273746" , fg = "black", width = "520")
main_title.pack()
username_label = Label(text="USUARIO", bg="#D5DBDB")
username_label.place(x=315, y=70)
password_label = Label(text="CONTRASEÑA", bg="#D5DBDB")
password_label.place(x=305, y=130)
age_label = Label(text="Rol de usuario", bg="#D5DBDB")
age_label.place(x=304, y=190)
username = StringVar()
password = StringVar()
fullname = StringVar()
age = StringVar()
username_entry = Entry(textvariable=username, width="40")
password_entry = Entry(textvariable=password, width="40", show="*")
username_entry.place(x=222, y=100)
password_entry.place(x=222, y=160)
submit_btn = Button(ventana, text="Ingresar", width="30", height="2", command=emergente, bg="#00CD63")
submit_btn.place(x=235, y=300)
lstDesplegable= tkinter.ttk.Combobox(ventana, width=37)
eleccion=["Usuario", "Administrador"]
lstDesplegable['values'] = eleccion
lstDesplegable.pack()
lstDesplegable.place(x=222, y=220)
c1 = Checkbutton(ventana, text="RECORDAR MIS DATOS", onvalue=1, offvalue=0, bg ="#273746", font='Helvetica 7 bold')
c1.pack()
c1.place(x=222, y=260)
ventana.mainloop()
from tkinter import *
from tkinter import messagebox as MessageBox
global ventana0
from PIL import ImageTk, Image
ventana0 = Tk()
ventana0.geometry("650x550")
username_label = Label(text=" Bienvenido a SebasCorp.Presione siguinete para ingresar al registro de datos ")
username_label.place(x=315, y=70)
username_label.place(x=140, y=350)
v2= ventana
submit_btn = Button(ventana0, text="Siguiente", width="30", height="2", bg="#00CD63",command =v2)
submit_btn.place(x=400, y=500)
imagen = ImageTk.PhotoImage(Image.open(r'C:\Users\Sebastian\PycharmProjects\pythonProject\Sebascorp0.png'))
label = Label(image=imagen)
label.pack()
label.place(x=90, y=100)
ventana0.mainloop()
def emergente():
usu=username.get()
sIndex = password.get()
lis = lstDesplegable.get()
cadena = ("USUARIO:", usu ) + ( "Contraseña:", sIndex)+ ( "Rol:", lis)
MessageBox.showinfo("Valores ingresados", cadena)
def v2 () :
ventana = Tk()
ventana.geometry("650x550")
ventana.title("BIENVENIDO")
ventana.resizable(False, False)
ventana.config(background="#273746")
main_title = Label(text = " BIENVENIDO ", font = ("Cambria", 21), bg ="#273746" , fg = "black", width = "520")
main_title.pack()
username_label = Label(text="USUARIO", bg="#D5DBDB")
username_label.place(x=315, y=70)
password_label = Label(text="CONTRASEÑA", bg="#D5DBDB")
password_label.place(x=305, y=130)
age_label = Label(text="Rol de usuario", bg="#D5DBDB")
age_label.place(x=304, y=190)
username = StringVar()
password = StringVar()
fullname = StringVar()
age = StringVar()
username_entry = Entry(textvariable=username, width="40")
password_entry = Entry(textvariable=password, width="40", show="*")
username_entry.place(x=222, y=100)
password_entry.place(x=222, y=160)
submit_btn = Button(ventana, text="Ingresar", width="30", height="2", command=emergente, bg="#00CD63")
submit_btn.place(x=235, y=300)
lstDesplegable= tkinter.ttk.Combobox(ventana, width=37)
eleccion=["Usuario", "Administrador"]
lstDesplegable['values'] = eleccion
lstDesplegable.pack()
lstDesplegable.place(x=222, y=220)
c1 = Checkbutton(ventana, text="RECORDAR MIS DATOS", onvalue=1, offvalue=0, bg ="#273746", font='Helvetica 7 bold')
c1.pack()
c1.place(x=222, y=260)
ventana.mainloop()
Valora esta pregunta


0