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
|
@ -3,8 +3,8 @@ import PySimpleGUI as sg
|
|||
|
||||
layout = [[sg.Graph(canvas_size=(400, 400), graph_bottom_left=(-100,-100), graph_top_right=(100,100), background_color='white', key='graph', tooltip='This is a cool graph!')],]
|
||||
|
||||
form = sg.FlexForm('Graph of Sine Function', grab_anywhere=True).Layout(layout).Finalize()
|
||||
graph = form.FindElement('graph')
|
||||
window = sg.Window('Graph of Sine Function', grab_anywhere=True).Layout(layout).Finalize()
|
||||
graph = window.FindElement('graph')
|
||||
|
||||
graph.DrawLine((-100,0), (100,0))
|
||||
graph.DrawLine((0,-100), (0,100))
|
||||
|
@ -13,4 +13,4 @@ for x in range(-100,100):
|
|||
y = math.sin(x/20)*50
|
||||
graph.DrawPoint((x,y), color='red')
|
||||
|
||||
button, values = form.Read()
|
||||
button, values = window.Read()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue