Major demo refresh.. switched everything to new function names, new design patterns
Out with the old, in with the new!!
This commit is contained in:
parent
2a06683383
commit
a1f4c60271
68 changed files with 706 additions and 1863 deletions
|
@ -2,12 +2,12 @@ import PySimpleGUI as sg
|
|||
|
||||
layout = [
|
||||
[sg.Graph(canvas_size=(400, 400), graph_bottom_left=(0,0), graph_top_right=(400, 400), background_color='red', key='graph')],
|
||||
[sg.T('Change circle color to:'), sg.ReadFormButton('Red'), sg.ReadFormButton('Blue'), sg.ReadFormButton('Move')]
|
||||
[sg.T('Change circle color to:'), sg.ReadButton('Red'), sg.ReadButton('Blue'), sg.ReadButton('Move')]
|
||||
]
|
||||
|
||||
form = sg.FlexForm('Graph test').Layout(layout).Finalize()
|
||||
window = sg.Window('Graph test').Layout(layout)
|
||||
|
||||
graph = form.FindElement('graph')
|
||||
graph = window.FindElement('graph')
|
||||
circle = graph.DrawCircle((75,75), 25, fill_color='black',line_color='white')
|
||||
point = graph.DrawPoint((75,75), 10, color='green')
|
||||
oval = graph.DrawOval((25,300), (100,280), fill_color='purple', line_color='purple' )
|
||||
|
@ -15,7 +15,7 @@ rectangle = graph.DrawRectangle((25,300), (100,280), line_color='purple' )
|
|||
line = graph.DrawLine((0,0), (100,100))
|
||||
|
||||
while True:
|
||||
button, values = form.Read()
|
||||
button, values = window.Read()
|
||||
if button is None:
|
||||
break
|
||||
if button is 'Blue':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue