N
N
nnikolyaa2021-11-26 22:07:31
Python
nnikolyaa, 2021-11-26 22:07:31

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()

I looked at the documentation ( https://pysimplegui.readthedocs.io/en/latest/#pysi... ) but couldn't find anything about tilt angle and repositioning.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ildar Gafarov, 2015-08-26
@MarkizaSckuza

Not in JSF. Use special libraries to create your URLs, such as PrettyFaces

I
IceJOKER, 2015-04-14
@IceJOKER

RewriteEngine on
RewriteRule ^page1.xhtml$ /pages/page1.xhtml

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question