#๐Ÿ”’ Button and Frame wont display tkinter

6 messages ยท Page 1 of 1 (latest)

hardy frost
bronze jungleBOT
#

@hardy frost

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

#

Hey @hardy frost!

It looks like you are trying to paste code into this channel.

You seem to be using the wrong symbols to indicate where the code block should start. The correct symbols would be ```, not '''.

Furthermore, it looks like you pasted Python code without syntax highlighting. Please use syntax highlighting to improve the legibility of your code and make it easier for us to help you.

To do this, use the following method:
```py
print('Hello, world!')
```

This will result in the following:

print('Hello, world!')```
You can **edit your original message** to correct your code block.
hardy frost
#
from tkinter import *
from PIL import ImageTk,Image

root = Tk()
root.title('Memento')

screen_width = root.winfo_screenwidth()
screen_height = root.winfo_screenheight()

root.geometry(f"{screen_width}x{screen_height}")

def Help(): 
    for widget in root.winfo_children():
        widget.destroy()
    
frame = Frame(root)
frame.place(x=0, y=0, anchor="nw", relwidth=1.0)

HelpButton = Button(root, text = "Help ?", command = Help)
HelpButton.place(relx = 1, rely = 1)


'''
def myClick():
    # clearing up the window
    for widget in root.winfo_children():
        widget.destroy()
    
    # creating a new page
    myLabel = Label(text="Hello " + e.get() + "...    text  ", bg='black')
    myLabel.grid(row=60, column=0)
    
    newButton = Button(root, bg='black', text="Some button you want to appear")
    newButton.grid(row=60, column=13)

myButton = Button(root, bg='black', text="next", command=myClick)
myButton.grid(row=0, column=13)
'''


root.mainloop()
bronze jungleBOT
#

@hardy frost

Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.