I'm trying to place a button with tkinter that does not appear its text placed on it until you click on it. I am trying to do it in the following way but it does not work for me the buttons come out the same in white. I have doubts in the function arguments inside the button but I'm not sure what I need to do
def callback_btn(btn,text):
btn.configure(text=text)
def dibujando_tab(matriz, numero_filas, numero_columnas, frame):
for row_index in range(numero_filas):
Grid.rowconfigure(frame, row_index, weight=2)
for col_index in range(numero_columnas):
Grid.columnconfigure(frame, col_index, weight=2)
texto=str(matriz[row_index][col_index][(row_index, col_index)][::]).replace("[","")
for char in n:
texto = texto.replace(char,"")
btn = Button(frame)
btn.configure( command = lambda: callback_btn(btn, texto))
btn.grid(row=row_index, column=col_index, sticky=N+S+E+W)