2
i am making a code in which the main window has 4 buttons (Create, Manage, Delete and About) and I wanted at the time I click the button create isse to the creation tab without having to open another window(Stay two windows) or close the main and open and other(i.e., closes and opens). Type the Ccleaner, Voce click and configuration, then in the same window it leaves the parsing part and opens the configuration.
Code :
from tkinter import *
from sqlite3 import *
class criar(object):
def __init__(self, principal):
#frames e empacotamento de frames
self.frame1 = Frame(principal)
self.frame1.place()
self.frame1.pack()
self.frame2 = Frame(principal)
self.frame2.place()
self.frame2.pack()
self.subFrameOptions = Frame(self.frame2)
self.subFrameOptions.place()
self.subFrameOptions.pack()
#texto exibido na tela
L1 = Label(self.frame1, text = "Nome do Seu Banco de Dado")
L1.place(x = 10,y = 10)
L1.pack()
E1 = Entry(self.frame1, bd = 5, )
E1.place(x = 60,y = 10)
E1.pack()
#checkButtons
self.nome = Checkbutton(self.subFrameOptions, bd = 5, text = 'Nome', variable = Vnome)
self.nome.pack(side = LEFT)
Vnome.get()
self.cor = Checkbutton(self.subFrameOptions, bd = 5, text = 'Cor', variable = Vcor)
self.cor.pack(side = LEFT)
Vcor.get()
self.cpf = Checkbutton(self.subFrameOptions, bd = 5, text = 'CPF', variable = Vcpf)
self.cpf.pack(side = LEFT)
Vcpf.get()
self.email = Checkbutton(self.subFrameOptions, bd = 5, text = 'Email', variable = Vemail)
self.email.pack(side = LEFT)
Vemail.get()
principal = Tk()
#variaveis dos metodos dos checkButtons
Vnome = IntVar()
Vcor = IntVar()
Vcpf = IntVar()
Vemail = IntVar()
#cria a instancia
criar(principal)
principal.geometry('400x300')
principal.title("Gerenciador de Cadastro")
principal.mainloop()
Then you can see that I want to create a database manager program in which the user type the name of the database and marks the options typed. I want to do something like (Pseudo code): I click on the button creates the name mark the options of data in the database and then send the code and already enter the management to look at the database created, but I do not want the program to keep opening and closing window, I want it to change tab in the same window.
Since you registered today on the site, I recommend that you first do the [tour] to understand at least the basics of how the system works. After, you can [Dit] the question and add the code you already have so that we can better understand what you have done and need to do. For code formatting, just copy it in the question editor, select it and press
Ctrl+K
.– Woss
ready I tidied up the question
– Giovanni Felicio