You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/cookbook.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,13 +68,12 @@ Some of the more advanced programs operate with the window remaining visible on
68
68
69
69
This code will present a window and will print values until the user clicks the exit button or closes window using an X.
70
70
71
-
Note the `do_not_clear` parameter that is described in the next design pattern.
72
71
73
72
```python
74
73
import PySimpleGUI as sg
75
74
76
75
layout = [[sg.Text('Persistent window')],
77
-
[sg.Input(do_not_clear=True)],
76
+
[sg.Input()],
78
77
[sg.Button('Read'), sg.Exit()]]
79
78
80
79
window = sg.Window('Window that stays open').Layout(layout)
@@ -98,7 +97,7 @@ This is a slightly more complex, but maybe more realistic version that reads inp
98
97
99
98
Do not worry yet what all of these statements mean. Just copy it so you can begin to play with it, make some changes. Experiment to see how thing work.
100
99
101
-
A final note... the parameter `do_not_clear` in the input call determines the action of the input field after a button event. If this value is True, the input value remains visible following button clicks. If False, then the input field is CLEARED of whatever was input. If you are building a "Form" type of window with data entry, you likely want False, the default setting (you can remove the parameter completely).
100
+
A final note... the parameter `do_not_clear` in the input call determines the action of the input field after a button event. If this value is True, the input value remains visible following button clicks. If False, then the input field is CLEARED of whatever was input. The default is True, which means
102
101
103
102
```python
104
103
import sys
@@ -1551,8 +1550,9 @@ That's all... Run your `my_program.exe` file on the Windows machine of your choo
1551
1550
1552
1551
Your EXE file should run without creating a "shell window". Only the GUI window should show up on your taskbar.
0 commit comments