We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import PySimpleGUI as sg width, height = size = 480, 480 layout = [ [sg.Graph(size, (0, 0), size, background_color='blue', key='GRAPH')], [sg.Slider(range=(1, 20), default_value=4, orientation='h', expand_x=True, enable_events=True, key='SLIDER')], ] window = sg.Window('Title', layout, finalize=True) graph:sg.Graph = window['GRAPH'] d, step, figure = 0, 4, None def rotate(): global d, figure, step if figure: graph.delete_figure(figure) points = [(d, height-1), (width-1, height-1-d), (width-1-d, 0), (0, d)] figure = graph.draw_polygon(points, fill_color='green') d = (d+step) % width window.TKroot.after(20, rotate) rotate() while True: event, values = window.read() if event == sg.WIN_CLOSED or event == 'Exit': break elif event == 'SLIDER': step = values[event] window.close()
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The text was updated successfully, but these errors were encountered: