Answer the question
In order to leave comments, you need to log in
How to set the coordinates and angle of the button in PySimpleGUI?
I have a button with an image in base64 format.
I want it to be located at certain coordinates, but instead it flies away.
with open(str(os.path.dirname(sys.argv[0]))+r"\game\img\6_C.png", "rb") as image_file:
base64_picture = base64.b64encode(image_file.read())
game_layout = [
[sg.Text("test object")],
[sg.Button('', image_data=base64_picture, key="-TEST-")]
]
game = sg.Window("Дурак", layout=game_layout, margins=(490,200))
while True:
event, values = game.read(timeout=0)
if event == sg.WIN_CLOSED:
sys.exit()
Answer the question
In order to leave comments, you need to log in
Not in JSF. Use special libraries to create your URLs, such as PrettyFaces
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question