Skip to content

Commit 350388b

Browse files
committed
add sample image
1 parent 2723aa5 commit 350388b

3 files changed

Lines changed: 40 additions & 2 deletions

File tree

README.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
`TkEasyGUI` is the easiest library for creating GUIs in Python.
88

9+
<img src="https://github.com/kujirahand/tkeasygui-python/raw/main/docs/image/icon256.png" width="256" alt="TkEasyGUI is the easiest library for creating GUIs in Python.">
10+
911
This library allows you to easily create GUI applications with Python.
1012
Since it is based on Tkinter, it runs consistently on Windows, macOS, and Linux.
1113
With a variety of built-in dialogs and customizable forms, you can develop applications effortlessly.
@@ -23,6 +25,7 @@ With a variety of built-in dialogs and customizable forms, you can develop appli
2325
Install package from [PyPI](https://pypi.org/project/TkEasyGUI/).
2426

2527
```sh
28+
# Install package from PyPI
2629
pip install TkEasyGUI
2730
# or
2831
python -m pip install TkEasyGUI
@@ -31,7 +34,13 @@ python -m pip install TkEasyGUI
3134
Install package from [GitHub Repository](https://github.com/kujirahand/tkeasygui-python).
3235

3336
```sh
37+
# Install package from GitHub Repository
3438
python -m pip install git+https://github.com/kujirahand/tkeasygui-python
39+
# or
40+
# Clone the repository and install
41+
git clone https://github.com/kujirahand/tkeasygui-python
42+
cd tkeasygui-python
43+
python -m pip install .
3544
```
3645

3746
## Features of This Library
@@ -79,6 +88,17 @@ if form:
7988

8089
<img src="https://github.com/kujirahand/tkeasygui-python/raw/main/docs/image/sample3.png" width="300" alt="TkEasyGUI">
8190

91+
A file selection dialog is also available.
92+
93+
```py
94+
import TkEasyGUI as eg
95+
# Show File dialog
96+
file_path = eg.popup_get_file("Select a file")
97+
eg.print(f"You selected: {file_path}")
98+
```
99+
100+
<img src="https://github.com/kujirahand/tkeasygui-python/raw/main/docs/image/sample-popup_get_file.png" width="300" alt="TkEasyGUI">
101+
82102
### More Dialogs
83103

84104
`TkEasyGUI` provides a variety of dialogs. For example, a color selection dialog, a file selection dialog, and a calendar dialog.
@@ -176,8 +196,6 @@ There are other helpful articles as well.
176196
- Methods such as Copy, Paste, and Cut are added to text boxes (Multiline/Input).
177197
- The system's default color scheme is utilized.
178198

179-
<img src="https://github.com/kujirahand/tkeasygui-python/raw/main/docs/image/icon256.png" width="256" alt="TkEasyGUI Logo">
180-
181199
## Additional Information
182200

183201
### How to run on Raspberry Pi?
493 KB
Loading

tests/popup/popup_get_file.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
"""Sample code for popup_get_file()"""
2+
3+
import TkEasyGUI as eg
4+
5+
# Show File dialog
6+
file_path = eg.popup_get_file("Select a file")
7+
eg.print(f"You selected: {file_path}")
8+
9+
# Show File dialog for multiple files
10+
files = eg.popup_get_file(
11+
"Select files",
12+
multiple_files=True,
13+
file_types=[("Text files", "*.txt"), ("All files", "*.*")],
14+
)
15+
if files:
16+
# Split the selected files into a list and show them in a popup
17+
files_list = files.split(eg.FILES_DELIMITER)
18+
eg.popup_listbox(files_list, "Selected files")
19+
else:
20+
eg.popup("No files selected.")

0 commit comments

Comments
 (0)