From 393050c1ae085fa66b773410a685d4ffac8b4758 Mon Sep 17 00:00:00 2001 From: PySimpleGUI Date: Sun, 20 Aug 2023 17:20:05 -0400 Subject: [PATCH] New Udemy Coupon. Added Listbox.set_index_color and Listbox.select_index to the SDK Call Reference --- PySimpleGUI.py | 8 ++-- docs/call reference.md | 40 ++++++++++++++++++- docs/cookbook.md | 4 +- docs/index.md | 4 +- docs/readme.md | 4 +- .../markdown input files/1_HEADER_top_part.md | 4 +- .../markdown input files/5_call_reference.md | 10 ++++- readme_creator/output/call reference.md | 40 ++++++++++++++++++- readme_creator/output/index.md | 4 +- 9 files changed, 99 insertions(+), 19 deletions(-) diff --git a/PySimpleGUI.py b/PySimpleGUI.py index 6b00923d..a91f9845 100644 --- a/PySimpleGUI.py +++ b/PySimpleGUI.py @@ -1,6 +1,6 @@ #!/usr/bin/python3 -version = __version__ = "4.61.0.194 Unreleased" +version = __version__ = "4.61.0.195 Unreleased" _change_log = """ Changelog since 4.60.0 released to PyPI on 8-May-2022 @@ -460,6 +460,8 @@ _change_log = """ Fixed spelling errors... resuse should have been reuse 4.61.0.194 Added Listbox.select_index and Listbox.set_index_color + 4.61.0.195 + New Udemy Coupon """ @@ -26779,7 +26781,7 @@ def main(): elif event == 'Get Text': popup_scrolled('Returned:', popup_get_text('Enter some text', keep_on_top=True)) elif event.startswith('-UDEMY-'): - webbrowser.open_new_tab(r'https://www.udemy.com/course/pysimplegui/?couponCode=9AF99B123C49D51EB547') + webbrowser.open_new_tab(r'https://www.udemy.com/course/pysimplegui/?couponCode=62A4C02AB0A3DAB34388') elif event.startswith('-SPONSOR-'): if webbrowser_available: webbrowser.open_new_tab(r'https://www.paypal.me/pythongui') @@ -26787,7 +26789,7 @@ def main(): if webbrowser_available: webbrowser.open_new_tab(r'https://www.buymeacoffee.com/PySimpleGUI') elif event in ('-EMOJI-HEARTS-', '-HEART-', '-PYTHON HEARTS-'): - popup_scrolled("Oh look! It's a Udemy discount coupon!", '9AF99B123C49D51EB547', + popup_scrolled("Oh look! It's a Udemy discount coupon!", '62A4C02AB0A3DAB34388', 'A personal message from Mike -- thank you so very much for supporting PySimpleGUI!', title='Udemy Coupon', image=EMOJI_BASE64_MIKE, keep_on_top=True) elif event == 'Themes': search_string = popup_get_text('Enter a search term or leave blank for all themes', 'Show Available Themes', keep_on_top=True) diff --git a/docs/call reference.md b/docs/call reference.md index b004ccac..37b27a5b 100644 --- a/docs/call reference.md +++ b/docs/call reference.md @@ -25,9 +25,9 @@ apply coupon for discount: - 9AF99B123C49D51EB547. + 62A4C02AB0A3DAB34388. - @@ -5583,6 +5583,24 @@ Metadata is an Element property that you can use at any time to hold any value |---|---|---| |(Any)| **return** | the current metadata value | +### select_index + +Selects an index while providing capability to setting the selected color for the index to specific text/background color + +``` +select_index(index, + highlight_text_color = None, + highlight_background_color = None) +``` + +Parameter Descriptions: + +|Type|Name|Meaning| +|--|--|--| +| int | index | specifies which item to change. index starts at 0 and goes to length of values list minus one | +| str | highlight_text_color | color of the text when this item is selected. | +| str | highlight_background_color | color of the background when this item is selected | + ### set_cursor Sets the cursor for the current Element. @@ -5616,6 +5634,24 @@ Parameter Descriptions: |--|--|--| | bool | force | if True will call focus_force otherwise calls focus_set | +### set_index_color + +Sets the color of a specific item without selecting it + +``` +set_index_color(index, + text_color = None, + background_color = None) +``` + +Parameter Descriptions: + +|Type|Name|Meaning| +|--|--|--| +| int | index | specifies which item to change. index starts at 0 and goes to length of values list minus one | +| str | text_color | color of the text for this item | +| str | background_color | color of the background for this item | + ### set_size Changes the size of an element to a specific size. diff --git a/docs/cookbook.md b/docs/cookbook.md index 98473f4c..4281f426 100644 --- a/docs/cookbook.md +++ b/docs/cookbook.md @@ -25,9 +25,9 @@ apply coupon for discount: - F988F082A3D18483B1C5 + 62A4C02AB0A3DAB34388 - diff --git a/docs/index.md b/docs/index.md index 11810190..a7ddf342 100644 --- a/docs/index.md +++ b/docs/index.md @@ -25,9 +25,9 @@ apply coupon for discount: - 9AF99B123C49D51EB547 + 62A4C02AB0A3DAB34388 - diff --git a/docs/readme.md b/docs/readme.md index 03488cae..7233b9b7 100644 --- a/docs/readme.md +++ b/docs/readme.md @@ -9,8 +9,8 @@ PySimpleGUI Udemy Course -
apply coupon for discount:
F988F082A3D18483B1C5
- click here to visit course page +
apply coupon for discount:
62A4C02AB0A3DAB34388
+ click here to visit course page diff --git a/readme_creator/markdown input files/1_HEADER_top_part.md b/readme_creator/markdown input files/1_HEADER_top_part.md index 320a4997..926f75f5 100644 --- a/readme_creator/markdown input files/1_HEADER_top_part.md +++ b/readme_creator/markdown input files/1_HEADER_top_part.md @@ -52,9 +52,9 @@ HOW DO I INSERT IMAGES ??? apply coupon for discount: - 9AF99B123C49D51EB547 + 62A4C02AB0A3DAB34388 - diff --git a/readme_creator/markdown input files/5_call_reference.md b/readme_creator/markdown input files/5_call_reference.md index 1f690a41..07fdb13a 100644 --- a/readme_creator/markdown input files/5_call_reference.md +++ b/readme_creator/markdown input files/5_call_reference.md @@ -25,9 +25,9 @@ apply coupon for discount: - 9AF99B123C49D51EB547. + 62A4C02AB0A3DAB34388. - @@ -1207,12 +1207,18 @@ The following methods are here for backwards compatibility reference. You will ### metadata +### select_index + + ### set_cursor ### set_focus +### set_index_color + + ### set_size diff --git a/readme_creator/output/call reference.md b/readme_creator/output/call reference.md index b004ccac..37b27a5b 100644 --- a/readme_creator/output/call reference.md +++ b/readme_creator/output/call reference.md @@ -25,9 +25,9 @@ apply coupon for discount: - 9AF99B123C49D51EB547. + 62A4C02AB0A3DAB34388. - @@ -5583,6 +5583,24 @@ Metadata is an Element property that you can use at any time to hold any value |---|---|---| |(Any)| **return** | the current metadata value | +### select_index + +Selects an index while providing capability to setting the selected color for the index to specific text/background color + +``` +select_index(index, + highlight_text_color = None, + highlight_background_color = None) +``` + +Parameter Descriptions: + +|Type|Name|Meaning| +|--|--|--| +| int | index | specifies which item to change. index starts at 0 and goes to length of values list minus one | +| str | highlight_text_color | color of the text when this item is selected. | +| str | highlight_background_color | color of the background when this item is selected | + ### set_cursor Sets the cursor for the current Element. @@ -5616,6 +5634,24 @@ Parameter Descriptions: |--|--|--| | bool | force | if True will call focus_force otherwise calls focus_set | +### set_index_color + +Sets the color of a specific item without selecting it + +``` +set_index_color(index, + text_color = None, + background_color = None) +``` + +Parameter Descriptions: + +|Type|Name|Meaning| +|--|--|--| +| int | index | specifies which item to change. index starts at 0 and goes to length of values list minus one | +| str | text_color | color of the text for this item | +| str | background_color | color of the background for this item | + ### set_size Changes the size of an element to a specific size. diff --git a/readme_creator/output/index.md b/readme_creator/output/index.md index 11810190..a7ddf342 100644 --- a/readme_creator/output/index.md +++ b/readme_creator/output/index.md @@ -25,9 +25,9 @@ apply coupon for discount: - 9AF99B123C49D51EB547 + 62A4C02AB0A3DAB34388 -