commit
adaf62f8e3
|
@ -4435,15 +4435,15 @@ def PopupYesNo(*args, button_color=None, background_color=None, text_color=None,
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
with Window('Demo form..') as form:
|
window = Window('Demo window..')
|
||||||
form_rows = [[Text('You are running the PySimpleGUI.py file itself')],
|
window_rows = [[Text('You are running the PySimpleGUI.py file itself')],
|
||||||
[Text('You should be importing it rather than running it', size=(50,2))],
|
[Text('You should be importing it rather than running it', size=(50,2))],
|
||||||
[Text('Here is your sample input form....')],
|
[Text('Here is your sample input window....')],
|
||||||
[Text('Source Folder', size=(15, 1), justification='right'), InputText('Source', focus=True),FolderBrowse()],
|
[Text('Source Folder', size=(15, 1), justification='right'), InputText('Source', focus=True),FolderBrowse()],
|
||||||
[Text('Destination Folder', size=(15, 1), justification='right'), InputText('Dest'), FolderBrowse()],
|
[Text('Destination Folder', size=(15, 1), justification='right'), InputText('Dest'), FolderBrowse()],
|
||||||
[Ok(), Cancel()]]
|
[Ok(), Cancel()]]
|
||||||
|
|
||||||
button, (source, dest) = form.LayoutAndRead(form_rows)
|
button, (source, dest) = window.LayoutAndRead(window_rows)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
![pysimplegui_logo](https://user-images.githubusercontent.com/13696193/43165867-fe02e3b2-8f62-11e8-9fd0-cc7c86b11772.png)
|
![pysimplegui_logo](https://user-images.githubusercontent.com/13696193/43165867-fe02e3b2-8f62-11e8-9fd0-cc7c86b11772.png)
|
||||||
|
|
||||||
[![Downloads](http://pepy.tech/badge/pysimplegui)](http://pepy.tech/project/pysimplegui) ![Documentation Status](https://readthedocs.org/projects/pysimplegui/badge/?version=latest) [![Python Version](https://img.shields.io/badge/Python-3-brightgreen.svg)](https://www.python.org/downloads/)
|
[![Downloads](http://pepy.tech/badge/pysimplegui)](http://pepy.tech/project/pysimplegui) ![Documentation Status](https://readthedocs.org/projects/pysimplegui/badge/?version=latest) [![Python Version](https://img.shields.io/badge/Python-3-brightgreen.svg)](https://www.python.org/downloads/)
|
||||||
|
@ -7,7 +9,7 @@
|
||||||
|
|
||||||
# PySimpleGUI
|
# PySimpleGUI
|
||||||
|
|
||||||
![Python Version](https://img.shields.io/badge/PySimpleGUI_Version-3.6.0-red.svg?longCache=true&style=for-the-badge)
|
![Python Version](https://img.shields.io/badge/PySimpleGUI_Version-3.6.2-red.svg?longCache=true&style=for-the-badge)
|
||||||
|
|
||||||
|
|
||||||
[Announcements of Latest Developments](https://github.com/MikeTheWatchGuy/PySimpleGUI/issues/142)
|
[Announcements of Latest Developments](https://github.com/MikeTheWatchGuy/PySimpleGUI/issues/142)
|
||||||
|
@ -839,7 +841,7 @@ This little program has a typical Event Loop
|
||||||
# ---- Process Button Clicks ---- #
|
# ---- Process Button Clicks ---- #
|
||||||
if button is None or button == 'Exit':
|
if button is None or button == 'Exit':
|
||||||
break
|
break
|
||||||
if button == 'Turn LED Off':
|
if button == 'Turn LED Off':
|
||||||
turn_LED_off()
|
turn_LED_off()
|
||||||
elif button == 'Turn LED On':
|
elif button == 'Turn LED On':
|
||||||
turn_LED_on()
|
turn_LED_on()
|
||||||
|
@ -1768,10 +1770,10 @@ Starting in version 2.9 you'll be able to do more complex layouts by using the C
|
||||||
Columns are specified in exactly the same way as a window is, as a list of lists.
|
Columns are specified in exactly the same way as a window is, as a list of lists.
|
||||||
|
|
||||||
def Column(layout - the list of rows that define the layout
|
def Column(layout - the list of rows that define the layout
|
||||||
background_color - color of background
|
background_color - color of background
|
||||||
size - size of visible portion of column
|
size - size of visible portion of column
|
||||||
pad - element padding to use when packing
|
pad - element padding to use when packing
|
||||||
scrollable - bool. True if should add scrollbars
|
scrollable - bool. True if should add scrollbars
|
||||||
|
|
||||||
|
|
||||||
Columns are needed when you have an element that has a height > 1 line on the left, with single-line elements on the right. Here's an example of this kind of layout:
|
Columns are needed when you have an element that has a height > 1 line on the left, with single-line elements on the right. Here's an example of this kind of layout:
|
||||||
|
@ -1826,17 +1828,17 @@ The default background color for Columns is the same as the default window backg
|
||||||
Frames work exactly the same way as Columns. You create layout that is then used to initialize the Frame.
|
Frames work exactly the same way as Columns. You create layout that is then used to initialize the Frame.
|
||||||
|
|
||||||
def Frame(title - the label / title to put on frame
|
def Frame(title - the label / title to put on frame
|
||||||
layout - list of rows of elements the frame contains
|
layout - list of rows of elements the frame contains
|
||||||
title_color - color of the title text
|
title_color - color of the title text
|
||||||
background_color - color of background
|
background_color - color of background
|
||||||
title_location - locations to put the title
|
title_location - locations to put the title
|
||||||
relief - type of relief to use
|
relief - type of relief to use
|
||||||
size - size of Frame in characters. Do not use if you want frame to autosize
|
size - size of Frame in characters. Do not use if you want frame to autosize
|
||||||
font - font to use for title
|
font - font to use for title
|
||||||
pad - element padding to use when packing
|
pad - element padding to use when packing
|
||||||
border_width - how thick the line going around frame should be
|
border_width - how thick the line going around frame should be
|
||||||
key - key used to location the element
|
key - key used to location the element
|
||||||
tooltip - tooltip text
|
tooltip - tooltip text
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1871,11 +1873,11 @@ In my opinion, the tkinter Canvas Widget is the most powerful of the tkinter wid
|
||||||
One such integration is with Matploplib and Pyplot. There is a Demo program written that you can use as a design pattern to get an understanding of how to use the Canvas Widget once you get it.
|
One such integration is with Matploplib and Pyplot. There is a Demo program written that you can use as a design pattern to get an understanding of how to use the Canvas Widget once you get it.
|
||||||
|
|
||||||
def Canvas(canvas - a tkinter canvasf if you created one. Normally not set
|
def Canvas(canvas - a tkinter canvasf if you created one. Normally not set
|
||||||
background_color - canvas color
|
background_color - canvas color
|
||||||
size - size in pixels
|
size - size in pixels
|
||||||
pad - element padding for packing
|
pad - element padding for packing
|
||||||
key - key used to lookup element
|
key - key used to lookup element
|
||||||
tooltip - tooltip text
|
tooltip - tooltip text
|
||||||
|
|
||||||
The order of operations to obtain a tkinter Canvas Widget is:
|
The order of operations to obtain a tkinter Canvas Widget is:
|
||||||
|
|
||||||
|
@ -2338,7 +2340,7 @@ Use realtime keyboard capture by calling
|
||||||
if button == "OK":
|
if button == "OK":
|
||||||
print(button, value, "exiting")
|
print(button, value, "exiting")
|
||||||
break
|
break
|
||||||
if button is not None:
|
if button is not None:
|
||||||
print(button)
|
print(button)
|
||||||
elif value is None:
|
elif value is None:
|
||||||
break
|
break
|
||||||
|
@ -2505,18 +2507,18 @@ Or beginning in version 2.9 you can choose from a look and feel using pre-define
|
||||||
|
|
||||||
Valid values for the description string are:
|
Valid values for the description string are:
|
||||||
|
|
||||||
GreenTan
|
GreenTan
|
||||||
LightGreen
|
LightGreen
|
||||||
BluePurple
|
BluePurple
|
||||||
Purple
|
Purple
|
||||||
BlueMono
|
BlueMono
|
||||||
GreenMono
|
GreenMono
|
||||||
BrownBlue
|
BrownBlue
|
||||||
BrightColors
|
BrightColors
|
||||||
NeutralBlue
|
NeutralBlue
|
||||||
Kayak
|
Kayak
|
||||||
SandyBeach
|
SandyBeach
|
||||||
TealMono
|
TealMono
|
||||||
|
|
||||||
To see the latest list of color choices, take a look at the bottom of the `PySimpleGUI.py` file where you'll find the `ChangLookAndFeel` function.
|
To see the latest list of color choices, take a look at the bottom of the `PySimpleGUI.py` file where you'll find the `ChangLookAndFeel` function.
|
||||||
|
|
||||||
|
@ -2662,8 +2664,8 @@ OneLineProgressMeter function added which gives you not only a one-line solution
|
||||||
* Text Element relief setting
|
* Text Element relief setting
|
||||||
* Keys as targets for buttons
|
* Keys as targets for buttons
|
||||||
* New names for buttons:
|
* New names for buttons:
|
||||||
* Button = SimpleButton
|
* Button = SimpleButton
|
||||||
* RButton = ReadButton = ReadFormButton
|
* RButton = ReadButton = ReadFormButton
|
||||||
* Double clickable list entries
|
* Double clickable list entries
|
||||||
* Auto sizing table widths works now
|
* Auto sizing table widths works now
|
||||||
* Feature DELETED - Scaling. Removed from all elements
|
* Feature DELETED - Scaling. Removed from all elements
|
||||||
|
@ -2767,5 +2769,3 @@ For Python questions, I simply start my query with 'Python'. Let's say you forg
|
||||||
In the hands of a competent programmer, this tool is **amazing**. It's a must-try kind of program that has completely changed my programming process. I'm not afraid of asking for help! You just have to be smart about using what you find.
|
In the hands of a competent programmer, this tool is **amazing**. It's a must-try kind of program that has completely changed my programming process. I'm not afraid of asking for help! You just have to be smart about using what you find.
|
||||||
|
|
||||||
The PySimpleGUI window that the results are shown in is an 'input' field which means you can copy and paste the results right into your code.
|
The PySimpleGUI window that the results are shown in is an 'input' field which means you can copy and paste the results right into your code.
|
||||||
|
|
||||||
|
|
||||||
|
|
78
readme.md
78
readme.md
|
@ -1,5 +1,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
![pysimplegui_logo](https://user-images.githubusercontent.com/13696193/43165867-fe02e3b2-8f62-11e8-9fd0-cc7c86b11772.png)
|
![pysimplegui_logo](https://user-images.githubusercontent.com/13696193/43165867-fe02e3b2-8f62-11e8-9fd0-cc7c86b11772.png)
|
||||||
|
|
||||||
[![Downloads](http://pepy.tech/badge/pysimplegui)](http://pepy.tech/project/pysimplegui) ![Documentation Status](https://readthedocs.org/projects/pysimplegui/badge/?version=latest) [![Python Version](https://img.shields.io/badge/Python-3-brightgreen.svg)](https://www.python.org/downloads/)
|
[![Downloads](http://pepy.tech/badge/pysimplegui)](http://pepy.tech/project/pysimplegui) ![Documentation Status](https://readthedocs.org/projects/pysimplegui/badge/?version=latest) [![Python Version](https://img.shields.io/badge/Python-3-brightgreen.svg)](https://www.python.org/downloads/)
|
||||||
|
@ -7,7 +9,7 @@
|
||||||
|
|
||||||
# PySimpleGUI
|
# PySimpleGUI
|
||||||
|
|
||||||
![Python Version](https://img.shields.io/badge/PySimpleGUI_Version-3.6.0-red.svg?longCache=true&style=for-the-badge)
|
![Python Version](https://img.shields.io/badge/PySimpleGUI_Version-3.6.2-red.svg?longCache=true&style=for-the-badge)
|
||||||
|
|
||||||
|
|
||||||
[Announcements of Latest Developments](https://github.com/MikeTheWatchGuy/PySimpleGUI/issues/142)
|
[Announcements of Latest Developments](https://github.com/MikeTheWatchGuy/PySimpleGUI/issues/142)
|
||||||
|
@ -839,7 +841,7 @@ This little program has a typical Event Loop
|
||||||
# ---- Process Button Clicks ---- #
|
# ---- Process Button Clicks ---- #
|
||||||
if button is None or button == 'Exit':
|
if button is None or button == 'Exit':
|
||||||
break
|
break
|
||||||
if button == 'Turn LED Off':
|
if button == 'Turn LED Off':
|
||||||
turn_LED_off()
|
turn_LED_off()
|
||||||
elif button == 'Turn LED On':
|
elif button == 'Turn LED On':
|
||||||
turn_LED_on()
|
turn_LED_on()
|
||||||
|
@ -1768,10 +1770,10 @@ Starting in version 2.9 you'll be able to do more complex layouts by using the C
|
||||||
Columns are specified in exactly the same way as a window is, as a list of lists.
|
Columns are specified in exactly the same way as a window is, as a list of lists.
|
||||||
|
|
||||||
def Column(layout - the list of rows that define the layout
|
def Column(layout - the list of rows that define the layout
|
||||||
background_color - color of background
|
background_color - color of background
|
||||||
size - size of visible portion of column
|
size - size of visible portion of column
|
||||||
pad - element padding to use when packing
|
pad - element padding to use when packing
|
||||||
scrollable - bool. True if should add scrollbars
|
scrollable - bool. True if should add scrollbars
|
||||||
|
|
||||||
|
|
||||||
Columns are needed when you have an element that has a height > 1 line on the left, with single-line elements on the right. Here's an example of this kind of layout:
|
Columns are needed when you have an element that has a height > 1 line on the left, with single-line elements on the right. Here's an example of this kind of layout:
|
||||||
|
@ -1826,17 +1828,17 @@ The default background color for Columns is the same as the default window backg
|
||||||
Frames work exactly the same way as Columns. You create layout that is then used to initialize the Frame.
|
Frames work exactly the same way as Columns. You create layout that is then used to initialize the Frame.
|
||||||
|
|
||||||
def Frame(title - the label / title to put on frame
|
def Frame(title - the label / title to put on frame
|
||||||
layout - list of rows of elements the frame contains
|
layout - list of rows of elements the frame contains
|
||||||
title_color - color of the title text
|
title_color - color of the title text
|
||||||
background_color - color of background
|
background_color - color of background
|
||||||
title_location - locations to put the title
|
title_location - locations to put the title
|
||||||
relief - type of relief to use
|
relief - type of relief to use
|
||||||
size - size of Frame in characters. Do not use if you want frame to autosize
|
size - size of Frame in characters. Do not use if you want frame to autosize
|
||||||
font - font to use for title
|
font - font to use for title
|
||||||
pad - element padding to use when packing
|
pad - element padding to use when packing
|
||||||
border_width - how thick the line going around frame should be
|
border_width - how thick the line going around frame should be
|
||||||
key - key used to location the element
|
key - key used to location the element
|
||||||
tooltip - tooltip text
|
tooltip - tooltip text
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1871,11 +1873,11 @@ In my opinion, the tkinter Canvas Widget is the most powerful of the tkinter wid
|
||||||
One such integration is with Matploplib and Pyplot. There is a Demo program written that you can use as a design pattern to get an understanding of how to use the Canvas Widget once you get it.
|
One such integration is with Matploplib and Pyplot. There is a Demo program written that you can use as a design pattern to get an understanding of how to use the Canvas Widget once you get it.
|
||||||
|
|
||||||
def Canvas(canvas - a tkinter canvasf if you created one. Normally not set
|
def Canvas(canvas - a tkinter canvasf if you created one. Normally not set
|
||||||
background_color - canvas color
|
background_color - canvas color
|
||||||
size - size in pixels
|
size - size in pixels
|
||||||
pad - element padding for packing
|
pad - element padding for packing
|
||||||
key - key used to lookup element
|
key - key used to lookup element
|
||||||
tooltip - tooltip text
|
tooltip - tooltip text
|
||||||
|
|
||||||
The order of operations to obtain a tkinter Canvas Widget is:
|
The order of operations to obtain a tkinter Canvas Widget is:
|
||||||
|
|
||||||
|
@ -2338,7 +2340,7 @@ Use realtime keyboard capture by calling
|
||||||
if button == "OK":
|
if button == "OK":
|
||||||
print(button, value, "exiting")
|
print(button, value, "exiting")
|
||||||
break
|
break
|
||||||
if button is not None:
|
if button is not None:
|
||||||
print(button)
|
print(button)
|
||||||
elif value is None:
|
elif value is None:
|
||||||
break
|
break
|
||||||
|
@ -2505,18 +2507,18 @@ Or beginning in version 2.9 you can choose from a look and feel using pre-define
|
||||||
|
|
||||||
Valid values for the description string are:
|
Valid values for the description string are:
|
||||||
|
|
||||||
GreenTan
|
GreenTan
|
||||||
LightGreen
|
LightGreen
|
||||||
BluePurple
|
BluePurple
|
||||||
Purple
|
Purple
|
||||||
BlueMono
|
BlueMono
|
||||||
GreenMono
|
GreenMono
|
||||||
BrownBlue
|
BrownBlue
|
||||||
BrightColors
|
BrightColors
|
||||||
NeutralBlue
|
NeutralBlue
|
||||||
Kayak
|
Kayak
|
||||||
SandyBeach
|
SandyBeach
|
||||||
TealMono
|
TealMono
|
||||||
|
|
||||||
To see the latest list of color choices, take a look at the bottom of the `PySimpleGUI.py` file where you'll find the `ChangLookAndFeel` function.
|
To see the latest list of color choices, take a look at the bottom of the `PySimpleGUI.py` file where you'll find the `ChangLookAndFeel` function.
|
||||||
|
|
||||||
|
@ -2662,8 +2664,8 @@ OneLineProgressMeter function added which gives you not only a one-line solution
|
||||||
* Text Element relief setting
|
* Text Element relief setting
|
||||||
* Keys as targets for buttons
|
* Keys as targets for buttons
|
||||||
* New names for buttons:
|
* New names for buttons:
|
||||||
* Button = SimpleButton
|
* Button = SimpleButton
|
||||||
* RButton = ReadButton = ReadFormButton
|
* RButton = ReadButton = ReadFormButton
|
||||||
* Double clickable list entries
|
* Double clickable list entries
|
||||||
* Auto sizing table widths works now
|
* Auto sizing table widths works now
|
||||||
* Feature DELETED - Scaling. Removed from all elements
|
* Feature DELETED - Scaling. Removed from all elements
|
||||||
|
@ -2767,5 +2769,3 @@ For Python questions, I simply start my query with 'Python'. Let's say you forg
|
||||||
In the hands of a competent programmer, this tool is **amazing**. It's a must-try kind of program that has completely changed my programming process. I'm not afraid of asking for help! You just have to be smart about using what you find.
|
In the hands of a competent programmer, this tool is **amazing**. It's a must-try kind of program that has completely changed my programming process. I'm not afraid of asking for help! You just have to be smart about using what you find.
|
||||||
|
|
||||||
The PySimpleGUI window that the results are shown in is an 'input' field which means you can copy and paste the results right into your code.
|
The PySimpleGUI window that the results are shown in is an 'input' field which means you can copy and paste the results right into your code.
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue