0
The Code I tried to use to put the image , but I could not :
[sg.Image(r"C:\Users\Josiene\Desktop\Criptografia1.png")],
And that’s all the code :
import PySimpleGUI as sg
sg.theme('Dark')
layout = [
[sg.Text('Your typed chars appear here:'), sg.Text(size=(12,1), key='-OUTPUT-')],
[sg.Image(r"C:\Users\Josiene\Desktop\Criptografia1.png")], #Esse é o código que eu coloquei achando que a imagem ia ficar como plano de fundo.
[sg.Input(key='-IN-')],
[sg.Button('Show'), sg.Button('Exit')]
]
window = sg.Window('Window Title', layout)
while True:
event, values = window.read()
print(event, values)
if event == sg.WIN_CLOSED or event == 'Exit':
break
if event == 'Show':
window['-OUTPUT-'].update(values['-IN-'])
window.close()
- Exit:
-
I want to put an image as background , but the image when I put is on top of the "Input" and buttons.
shows the output of how it is getting.
– lmonferrari
I put out the code
– Deregue pinto
You have to put that "blue lock" image in the background.You know how to do this ?
– Deregue pinto
I don’t know, it’s just that by putting out the door, people can better interpret what needs to be done. I saw that using Tk() is simpler but about this library you are using I found nothing.
– lmonferrari
beauty bro , thanks for having tried, I think someday whoever created the library come here and answer kkkkkk
– Deregue pinto
for nothing! if I find any solution I put here
– lmonferrari
Found the solution?
– user198451
You need to put the image in the background,i don’t Read the documentation in that part,but this is the doc: https://pysimplegui.readthedocs.io/en/latest/#image-element
– Dev Python e Java