# Tkface
[](https://opensource.org/licenses/MIT)
[](https://pypi.org/project/tkface)
[](https://github.com/mashu3/tkface/releases)
[](https://pypi.org/project/tkface/)
[](https://pepy.tech/project/tkface)
**Restore the "face" to your Tkinter!**
A multilingual GUI extension library for Tkinter (tkinter) - bringing back the "face" (interface) that Tkinter left behind. **Built with zero external dependencies, using only Python's standard library.**
---
## 📖 Overview
Tkface is a Python library designed to restore and enhance the "face" (user interface) of Tkinter. While Tkinter is a powerful toolkit, its dialogs and user-facing components are minimal and lack friendly interfaces. Tkface fills this gap with multilingual dialogs, advanced message boxes, and Windows-specific features. **The library is built entirely with Python's standard library, requiring no external dependencies.**
- **Completing the Interface**: Tkinter stands for "Tk **inter**face," providing a powerful core for building GUIs. Tk**face** is designed to complement it by providing the user-facing components—the "**face**"—that are essential for a polished user experience but not built into the standard library. It extends Tkinter with ready-to-use, multilingual dialogs and widgets, letting you build sophisticated, user-friendly applications with less effort.
- **Vibe Coding**: Developed with a "Vibe Coding" approach-prioritizing developer joy, rapid prototyping, and a sense of fun. The codebase is hackable, readable, and easy to extend—and so is this document.
---
## 🔧 Requirements
- Python 3.7+
- Tkinter (included with Python)
- **Zero external dependencies** - Uses only Python standard library
---
## 📦 Installation
Install the latest version from PyPI:
```bash
pip install tkface
```
Or install from the GitHub repository for the latest changes:
```bash
pip install git+https://github.com/mashu3/tkface.git
```
---
## 🚀 Usage
### Message Boxes
```python
import tkface
# Simple information dialog
tkface.messagebox.showinfo("Operation completed successfully!")
# Multilingual support
tkface.messagebox.showerror("An error has occurred!", language="ja")
# With system sound (Windows only)
tkface.messagebox.showerror("An error has occurred!", bell=True)
# Confirmation dialog
if tkface.messagebox.askyesno("Do you want to save?"):
# Handle save operation
tkface.messagebox.showinfo("File saved successfully!")
```
### Screenshots
| Dialog Type | Windows | macOS |
|-------------|---------|-------|
| **Warning** | <img src="https://raw.githubusercontent.com/mashu3/tkface/main/examples/images/tkface_messagebox_warning_windows.png" width="200px" alt="Warning Dialog"> | <img src="https://raw.githubusercontent.com/mashu3/tkface/main/examples/images/tkface_messagebox_warning_mac.png" width="200px" alt="Warning Dialog"> |
| **Error** | <img src="https://raw.githubusercontent.com/mashu3/tkface/main/examples/images/tkface_messagebox_error_windows.png" width="200px" alt="Error Dialog"> | <img src="https://raw.githubusercontent.com/mashu3/tkface/main/examples/images/tkface_messagebox_error_mac.png" width="200px" alt="Error Dialog"> |
| **Information** | <img src="https://raw.githubusercontent.com/mashu3/tkface/main/examples/images/tkface_messagebox_info_windows.png" width="200px" alt="Info Dialog"> | <img src="https://raw.githubusercontent.com/mashu3/tkface/main/examples/images/tkface_messagebox_info_mac.png" width="200px" alt="Info Dialog"> |
| **Question** | <img src="https://raw.githubusercontent.com/mashu3/tkface/main/examples/images/tkface_messagebox_question_windows.png" width="200px" alt="Question Dialog"> | <img src="https://raw.githubusercontent.com/mashu3/tkface/main/examples/images/tkface_messagebox_question_mac.png" width="200px" alt="Question Dialog"> |
### Input Dialogs
```python
import tkface
# String input
name = tkface.simpledialog.askstring("Enter your name:")
# Integer input with validation
age = tkface.simpledialog.askinteger("Enter your age:", minvalue=0, maxvalue=120)
# List selection dialog
color = tkface.simpledialog.askfromlistbox("Choose a color:", choices=["Red", "Green", "Blue"])
# Multiple selection dialog
colors = tkface.simpledialog.askfromlistbox("Choose colors:", choices=["Red", "Green", "Blue"], multiple=True)
```
### File and Directory Selection Dialogs
```python
import tkface
# Select a single file
file_path = tkface.pathchooser.askopenfile(
title="Select a File",
filetypes=[("Text files", "*.txt"), ("Python files", "*.py")]
)
# Select multiple files
file_paths = tkface.pathchooser.askopenfiles(
title="Select Multiple Files",
filetypes=[("Text files", "*.txt"), ("All files", "*.*")]
)
# Select a directory
directory = tkface.pathchooser.askdirectory(
title="Select a Directory"
)
# Advanced file/directory selection
paths = tkface.pathchooser.askpath(
select="both", # "file", "dir", or "both"
multiple=True, # Allow multiple selection
initialdir="/path/to/start",
filetypes=[("Text files", "*.txt"), ("Log files", "*.log")]
)
```
**Features**:
- **Directory Tree**: Hierarchical folder navigation with icons
- **File List**: Details view with size, modification date, and file type
- **View Modes**: Switch between list and details view
- **File Filtering**: Filter by file type with dropdown
- **Path Navigation**: Direct path entry with Go button
- **Refresh**: Refresh current directory (F5 or Ctrl+R)
- **Multiple Selection**: Select multiple files/directories
- **Keyboard Shortcuts**: Enter (OK), Escape (Cancel), F5 (Refresh)
**Note**: All file dialog functions return a list of selected paths. If cancelled, an empty list is returned.
### DatePicker Widgets
#### Screenshots
| Widget Type | Windows | macOS |
|-------------|---------|-------|
| **DateFrame** | <img src="https://raw.githubusercontent.com/mashu3/tkface/main/examples/images/tkface_calendar_dateframe_windows.png" width="200px" alt="DateFrame Widget"> | <img src="https://raw.githubusercontent.com/mashu3/tkface/main/examples/images/tkface_calendar_dateframe_mac.png" width="200px" alt="DateFrame Widget"> |
#### Usage Examples
**Initial Date Behavior**: When no `year` and `month` parameters are specified, both `DateEntry` and `DateFrame` automatically use the current date as the initial value. You can also explicitly set the initial date using the `year` and `month` parameters.
**Navigation Features**: The calendar widgets include intuitive navigation features:
- Click on the year/month header to switch to year selection mode (3x4 month grid)
- Click on a month in year selection mode to switch to that month
- Use arrow buttons to navigate between months/years
- All navigation maintains the selected date and theme settings
```python
import tkinter as tk
import tkface
root = tk.Tk()
root.title("DateEntry Demo")
# Basic DateEntry (uses current date by default)
date_entry = tkface.DateEntry(root)
date_entry.pack(padx=10, pady=10)
# DateFrame with custom button text
date_frame = tkface.DateFrame(root, button_text="📅")
date_frame.pack(padx=10, pady=10)
# Advanced DateEntry with features
date_entry = tkface.DateEntry(
root,
show_week_numbers=True, # Show week numbers
week_start="Monday", # Start week on Monday
day_colors={ # Color weekends
"Sunday": "lightcoral",
"Saturday": "lightblue"
},
holidays={ # Highlight holidays
"2025-08-15": "red", # Custom holiday
"2025-08-30": "blue" # Another holiday
},
theme="light", # Light theme
language="ja" # Japanese language
)
# DateEntry with specific initial date
date_entry_with_date = tkface.DateEntry(
root,
year=2025, # Set initial year
month=8, # Set initial month
date_format="%Y年%m月%d日" # Japanese date format
)
date_entry_with_date.pack(padx=10, pady=10)
# Get selected date
selected_date = date_entry.get_date()
# Process the selected date as needed
if selected_date:
# Handle the selected date
pass
# Get selected date from specific date entry
selected_date_with_date = date_entry_with_date.get_date()
root.mainloop()
```
#### Key Parameters
| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `year` | `int` | `None` (current year) | Initial year to display |
| `month` | `int` | `None` (current month) | Initial month to display |
| `date_format` | `str` | `"%Y-%m-%d"` | Date format string |
| `button_text` | `str` | `"📅"` | Button text (DateFrame only) |
| `theme` | `str` | `"light"` | Theme: "light" or "dark" |
| `language` | `str` | `"en"` | Language: "en" or "ja" |
#### DateFrame vs DateEntry
- **DateFrame**: Customizable button text, more flexible layout
- **DateEntry**: Combobox-style appearance, standard system look
### Windows-Specific Features
Tkface provides Windows-specific enhancements that automatically detect the platform and gracefully degrade on non-Windows systems. These features include DPI awareness, Windows 11 corner rounding control, and system sound integration.
#### DPI Awareness and Scaling
```python
import tkinter as tk
import tkface
root = tk.Tk()
# Enable DPI awareness and automatic scaling
tkface.win.dpi(root) # Enable DPI awareness
# Window geometry is automatically adjusted for DPI
root.geometry("600x400") # Will be scaled appropriately
# UI elements are automatically scaled
button = tkface.Button(root, text="Scaled Button")
button.pack()
root.mainloop()
```
#### Other Windows Features
```python
import tkinter as tk
import tkface
root = tk.Tk()
root.title("Windows Features Demo")
# Enable DPI awareness and automatic scaling
tkface.win.dpi(root) # Enable DPI awareness (Windows only)
# Set window geometry
root.geometry("600x400")
# Create your widgets here
def on_button_click():
tkface.messagebox.showinfo("Info", "Button clicked!")
button = tkface.Button(root, text="Flat Button", command=on_button_click) # Flat styling on Windows
button.pack()
# Disable corner rounding (Windows 11 only) - call after all widgets are created
tkface.win.unround(root) # Disable corner rounding (Windows 11 only)
# Play Windows system sound (Windows only)
tkface.win.bell("error") # Play Windows system sound (Windows only)
root.mainloop()
```
**Important**: Call `tkface.win.unround(root)` after creating all widgets but before `mainloop()` to ensure the window is fully initialized.
> **Note**: All Windows-specific features gracefully degrade on non-Windows platforms.
### Language Management
```python
import tkface
import tkinter as tk
root = tk.Tk()
tkface.lang.set("ja", root) # Set language manually
tkface.lang.set("auto", root) # Auto-detect system language
# Register custom translations
custom_translations = {
"ja": {
"Choose an option:": "オプションを選択:",
"Option 1": "オプション1",
"Option 2": "オプション2",
"Option 3": "オプション3"
}
}
tkface.simpledialog.askfromlistbox(
"Choose an option:",
choices=["Option 1", "Option 2", "Option 3"],
custom_translations=custom_translations,
language="ja"
)
```
---
## 🧩 Features
- **Zero Dependencies**: Built entirely with Python's standard library - no external packages required
- **Multilingual Support**: Automatic language detection, English/Japanese built-in, custom dictionaries
- **Enhanced Message Boxes**: All standard and advanced dialogs, custom positioning, keyboard shortcuts, tab navigation
- **Enhanced Input Dialogs**: String/integer/float input, validation, password input, list selection, custom positioning
- **File and Directory Selection**: Advanced file browser with directory tree, file filtering, multiple selection support
- **Calendar Widget**: Multi-month display, week numbers, holiday highlighting, customizable colors, language support
- **Windows Features**:
- **DPI Awareness**: Automatic scaling for high-resolution displays
- **Windows 11 Corner Rounding Control**: Modern UI appearance
- **Windows System Sounds**: Platform-specific audio feedback
- **Flat Button Styling**: Modern appearance without shadows
- All features gracefully degrade on other OS
---
## 📁 Examples
See the `examples/` directory for complete working examples:
- `demo_messagebox.py` - Message box demonstrations
- `demo_simpledialog.py` - Input dialog demonstrations
- `demo_pathchooser.py` - File and directory selection demonstrations
- `demo_calendar.py` - Calendar widget demonstrations
- `demo_windows_features.py` - Windows-specific features demonstrations
> **Note**: Test files are not included in the public release. For testing, see the development repository.
---
## 🌐 Supported Languages
- **English (en)**: Default, comprehensive translations
- **Japanese (ja)**: Complete Japanese translations
You can add support for any language by providing translation dictionaries:
```python
custom_translations = {
"fr": {
"ok": "OK",
"cancel": "Annuler",
"yes": "Oui",
"no": "Non",
"Error": "Erreur",
"Warning": "Avertissement"
}
}
```
---
## 📝 License
This project is licensed under the MIT License. See the LICENSE file for details.
---
## 👨💻 Author
[mashu3](https://github.com/mashu3)
[](https://github.com/mashu3/tkface/graphs/contributors)
Raw data
{
"_id": null,
"home_page": null,
"name": "tkface",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "tkinter, gui, multilingual, internationalization, messagebox, dialog, calendar, theme, windows",
"author": "mashu3",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/b0/e8/65efdf16c914102d430a4526e2978029e2cb5213ef92e4cb08e504c6bccb/tkface-0.1.0.tar.gz",
"platform": null,
"description": "# Tkface\n[](https://opensource.org/licenses/MIT)\n[](https://pypi.org/project/tkface)\n[](https://github.com/mashu3/tkface/releases)\n[](https://pypi.org/project/tkface/)\n[](https://pepy.tech/project/tkface)\n\n**Restore the \"face\" to your Tkinter!**\n\nA multilingual GUI extension library for Tkinter (tkinter) - bringing back the \"face\" (interface) that Tkinter left behind. **Built with zero external dependencies, using only Python's standard library.**\n\n---\n\n## \ud83d\udcd6 Overview\n\nTkface is a Python library designed to restore and enhance the \"face\" (user interface) of Tkinter. While Tkinter is a powerful toolkit, its dialogs and user-facing components are minimal and lack friendly interfaces. Tkface fills this gap with multilingual dialogs, advanced message boxes, and Windows-specific features. **The library is built entirely with Python's standard library, requiring no external dependencies.**\n\n- **Completing the Interface**: Tkinter stands for \"Tk **inter**face,\" providing a powerful core for building GUIs. Tk**face** is designed to complement it by providing the user-facing components\u2014the \"**face**\"\u2014that are essential for a polished user experience but not built into the standard library. It extends Tkinter with ready-to-use, multilingual dialogs and widgets, letting you build sophisticated, user-friendly applications with less effort.\n- **Vibe Coding**: Developed with a \"Vibe Coding\" approach-prioritizing developer joy, rapid prototyping, and a sense of fun. The codebase is hackable, readable, and easy to extend\u2014and so is this document.\n\n---\n\n## \ud83d\udd27 Requirements\n\n- Python 3.7+\n- Tkinter (included with Python)\n- **Zero external dependencies** - Uses only Python standard library\n\n---\n\n## \ud83d\udce6 Installation\n\nInstall the latest version from PyPI:\n\n```bash\npip install tkface\n```\n\nOr install from the GitHub repository for the latest changes:\n\n```bash\npip install git+https://github.com/mashu3/tkface.git\n```\n\n---\n\n## \ud83d\ude80 Usage\n\n### Message Boxes\n\n```python\nimport tkface\n\n# Simple information dialog\ntkface.messagebox.showinfo(\"Operation completed successfully!\")\n\n# Multilingual support\ntkface.messagebox.showerror(\"An error has occurred!\", language=\"ja\")\n\n# With system sound (Windows only)\ntkface.messagebox.showerror(\"An error has occurred!\", bell=True)\n\n# Confirmation dialog\nif tkface.messagebox.askyesno(\"Do you want to save?\"):\n # Handle save operation\n tkface.messagebox.showinfo(\"File saved successfully!\")\n```\n\n### Screenshots\n\n| Dialog Type | Windows | macOS |\n|-------------|---------|-------|\n| **Warning** | <img src=\"https://raw.githubusercontent.com/mashu3/tkface/main/examples/images/tkface_messagebox_warning_windows.png\" width=\"200px\" alt=\"Warning Dialog\"> | <img src=\"https://raw.githubusercontent.com/mashu3/tkface/main/examples/images/tkface_messagebox_warning_mac.png\" width=\"200px\" alt=\"Warning Dialog\"> |\n| **Error** | <img src=\"https://raw.githubusercontent.com/mashu3/tkface/main/examples/images/tkface_messagebox_error_windows.png\" width=\"200px\" alt=\"Error Dialog\"> | <img src=\"https://raw.githubusercontent.com/mashu3/tkface/main/examples/images/tkface_messagebox_error_mac.png\" width=\"200px\" alt=\"Error Dialog\"> |\n| **Information** | <img src=\"https://raw.githubusercontent.com/mashu3/tkface/main/examples/images/tkface_messagebox_info_windows.png\" width=\"200px\" alt=\"Info Dialog\"> | <img src=\"https://raw.githubusercontent.com/mashu3/tkface/main/examples/images/tkface_messagebox_info_mac.png\" width=\"200px\" alt=\"Info Dialog\"> |\n| **Question** | <img src=\"https://raw.githubusercontent.com/mashu3/tkface/main/examples/images/tkface_messagebox_question_windows.png\" width=\"200px\" alt=\"Question Dialog\"> | <img src=\"https://raw.githubusercontent.com/mashu3/tkface/main/examples/images/tkface_messagebox_question_mac.png\" width=\"200px\" alt=\"Question Dialog\"> |\n\n### Input Dialogs\n\n```python\nimport tkface\n\n# String input\nname = tkface.simpledialog.askstring(\"Enter your name:\")\n\n# Integer input with validation\nage = tkface.simpledialog.askinteger(\"Enter your age:\", minvalue=0, maxvalue=120)\n\n# List selection dialog\ncolor = tkface.simpledialog.askfromlistbox(\"Choose a color:\", choices=[\"Red\", \"Green\", \"Blue\"])\n\n# Multiple selection dialog\ncolors = tkface.simpledialog.askfromlistbox(\"Choose colors:\", choices=[\"Red\", \"Green\", \"Blue\"], multiple=True)\n```\n\n### File and Directory Selection Dialogs\n\n```python\nimport tkface\n\n# Select a single file\nfile_path = tkface.pathchooser.askopenfile(\n title=\"Select a File\",\n filetypes=[(\"Text files\", \"*.txt\"), (\"Python files\", \"*.py\")]\n)\n\n# Select multiple files\nfile_paths = tkface.pathchooser.askopenfiles(\n title=\"Select Multiple Files\",\n filetypes=[(\"Text files\", \"*.txt\"), (\"All files\", \"*.*\")]\n)\n\n# Select a directory\ndirectory = tkface.pathchooser.askdirectory(\n title=\"Select a Directory\"\n)\n\n# Advanced file/directory selection\npaths = tkface.pathchooser.askpath(\n select=\"both\", # \"file\", \"dir\", or \"both\"\n multiple=True, # Allow multiple selection\n initialdir=\"/path/to/start\",\n filetypes=[(\"Text files\", \"*.txt\"), (\"Log files\", \"*.log\")]\n)\n```\n\n**Features**:\n- **Directory Tree**: Hierarchical folder navigation with icons\n- **File List**: Details view with size, modification date, and file type\n- **View Modes**: Switch between list and details view\n- **File Filtering**: Filter by file type with dropdown\n- **Path Navigation**: Direct path entry with Go button\n- **Refresh**: Refresh current directory (F5 or Ctrl+R)\n- **Multiple Selection**: Select multiple files/directories\n- **Keyboard Shortcuts**: Enter (OK), Escape (Cancel), F5 (Refresh)\n\n**Note**: All file dialog functions return a list of selected paths. If cancelled, an empty list is returned.\n\n### DatePicker Widgets\n\n#### Screenshots\n\n| Widget Type | Windows | macOS |\n|-------------|---------|-------|\n| **DateFrame** | <img src=\"https://raw.githubusercontent.com/mashu3/tkface/main/examples/images/tkface_calendar_dateframe_windows.png\" width=\"200px\" alt=\"DateFrame Widget\"> | <img src=\"https://raw.githubusercontent.com/mashu3/tkface/main/examples/images/tkface_calendar_dateframe_mac.png\" width=\"200px\" alt=\"DateFrame Widget\"> |\n\n#### Usage Examples\n\n**Initial Date Behavior**: When no `year` and `month` parameters are specified, both `DateEntry` and `DateFrame` automatically use the current date as the initial value. You can also explicitly set the initial date using the `year` and `month` parameters.\n\n**Navigation Features**: The calendar widgets include intuitive navigation features:\n- Click on the year/month header to switch to year selection mode (3x4 month grid)\n- Click on a month in year selection mode to switch to that month\n- Use arrow buttons to navigate between months/years\n- All navigation maintains the selected date and theme settings\n\n```python\nimport tkinter as tk\nimport tkface\n\nroot = tk.Tk()\nroot.title(\"DateEntry Demo\")\n\n# Basic DateEntry (uses current date by default)\ndate_entry = tkface.DateEntry(root)\ndate_entry.pack(padx=10, pady=10)\n\n# DateFrame with custom button text\ndate_frame = tkface.DateFrame(root, button_text=\"\ud83d\udcc5\")\ndate_frame.pack(padx=10, pady=10)\n\n# Advanced DateEntry with features\ndate_entry = tkface.DateEntry(\n root,\n show_week_numbers=True, # Show week numbers\n week_start=\"Monday\", # Start week on Monday\n day_colors={ # Color weekends\n \"Sunday\": \"lightcoral\",\n \"Saturday\": \"lightblue\"\n },\n holidays={ # Highlight holidays\n \"2025-08-15\": \"red\", # Custom holiday\n \"2025-08-30\": \"blue\" # Another holiday\n },\n theme=\"light\", # Light theme\n language=\"ja\" # Japanese language\n)\n\n# DateEntry with specific initial date\ndate_entry_with_date = tkface.DateEntry(\n root,\n year=2025, # Set initial year\n month=8, # Set initial month\n date_format=\"%Y\u5e74%m\u6708%d\u65e5\" # Japanese date format\n)\ndate_entry_with_date.pack(padx=10, pady=10)\n\n# Get selected date\nselected_date = date_entry.get_date()\n# Process the selected date as needed\nif selected_date:\n # Handle the selected date\n pass\n\n# Get selected date from specific date entry\nselected_date_with_date = date_entry_with_date.get_date()\n\nroot.mainloop()\n```\n\n#### Key Parameters\n\n| Parameter | Type | Default | Description |\n|-----------|------|---------|-------------|\n| `year` | `int` | `None` (current year) | Initial year to display |\n| `month` | `int` | `None` (current month) | Initial month to display |\n| `date_format` | `str` | `\"%Y-%m-%d\"` | Date format string |\n| `button_text` | `str` | `\"\ud83d\udcc5\"` | Button text (DateFrame only) |\n| `theme` | `str` | `\"light\"` | Theme: \"light\" or \"dark\" |\n| `language` | `str` | `\"en\"` | Language: \"en\" or \"ja\" |\n\n#### DateFrame vs DateEntry\n\n- **DateFrame**: Customizable button text, more flexible layout\n- **DateEntry**: Combobox-style appearance, standard system look\n\n### Windows-Specific Features\n\nTkface provides Windows-specific enhancements that automatically detect the platform and gracefully degrade on non-Windows systems. These features include DPI awareness, Windows 11 corner rounding control, and system sound integration.\n\n#### DPI Awareness and Scaling\n\n```python\nimport tkinter as tk\nimport tkface\n\nroot = tk.Tk()\n\n# Enable DPI awareness and automatic scaling\ntkface.win.dpi(root) # Enable DPI awareness\n\n# Window geometry is automatically adjusted for DPI\nroot.geometry(\"600x400\") # Will be scaled appropriately\n\n# UI elements are automatically scaled\nbutton = tkface.Button(root, text=\"Scaled Button\")\nbutton.pack()\n\nroot.mainloop()\n```\n\n#### Other Windows Features\n\n```python\nimport tkinter as tk\nimport tkface\n\nroot = tk.Tk()\nroot.title(\"Windows Features Demo\")\n\n# Enable DPI awareness and automatic scaling\ntkface.win.dpi(root) # Enable DPI awareness (Windows only)\n\n# Set window geometry\nroot.geometry(\"600x400\")\n\n# Create your widgets here\ndef on_button_click():\n tkface.messagebox.showinfo(\"Info\", \"Button clicked!\")\n\nbutton = tkface.Button(root, text=\"Flat Button\", command=on_button_click) # Flat styling on Windows\nbutton.pack()\n\n# Disable corner rounding (Windows 11 only) - call after all widgets are created\ntkface.win.unround(root) # Disable corner rounding (Windows 11 only)\n\n# Play Windows system sound (Windows only)\ntkface.win.bell(\"error\") # Play Windows system sound (Windows only)\n\nroot.mainloop()\n```\n\n**Important**: Call `tkface.win.unround(root)` after creating all widgets but before `mainloop()` to ensure the window is fully initialized.\n\n> **Note**: All Windows-specific features gracefully degrade on non-Windows platforms.\n\n### Language Management\n\n```python\nimport tkface\nimport tkinter as tk\n\nroot = tk.Tk()\ntkface.lang.set(\"ja\", root) # Set language manually\ntkface.lang.set(\"auto\", root) # Auto-detect system language\n\n# Register custom translations\ncustom_translations = {\n \"ja\": {\n \"Choose an option:\": \"\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u9078\u629e:\",\n \"Option 1\": \"\u30aa\u30d7\u30b7\u30e7\u30f31\",\n \"Option 2\": \"\u30aa\u30d7\u30b7\u30e7\u30f32\", \n \"Option 3\": \"\u30aa\u30d7\u30b7\u30e7\u30f33\"\n }\n}\ntkface.simpledialog.askfromlistbox(\n \"Choose an option:\",\n choices=[\"Option 1\", \"Option 2\", \"Option 3\"],\n custom_translations=custom_translations,\n language=\"ja\"\n)\n```\n\n---\n\n## \ud83e\udde9 Features\n\n- **Zero Dependencies**: Built entirely with Python's standard library - no external packages required\n- **Multilingual Support**: Automatic language detection, English/Japanese built-in, custom dictionaries\n- **Enhanced Message Boxes**: All standard and advanced dialogs, custom positioning, keyboard shortcuts, tab navigation\n- **Enhanced Input Dialogs**: String/integer/float input, validation, password input, list selection, custom positioning\n- **File and Directory Selection**: Advanced file browser with directory tree, file filtering, multiple selection support\n- **Calendar Widget**: Multi-month display, week numbers, holiday highlighting, customizable colors, language support\n- **Windows Features**: \n - **DPI Awareness**: Automatic scaling for high-resolution displays\n - **Windows 11 Corner Rounding Control**: Modern UI appearance\n - **Windows System Sounds**: Platform-specific audio feedback\n - **Flat Button Styling**: Modern appearance without shadows\n - All features gracefully degrade on other OS\n\n---\n\n## \ud83d\udcc1 Examples\n\nSee the `examples/` directory for complete working examples:\n\n- `demo_messagebox.py` - Message box demonstrations\n- `demo_simpledialog.py` - Input dialog demonstrations\n- `demo_pathchooser.py` - File and directory selection demonstrations\n- `demo_calendar.py` - Calendar widget demonstrations\n- `demo_windows_features.py` - Windows-specific features demonstrations\n\n> **Note**: Test files are not included in the public release. For testing, see the development repository.\n\n---\n\n## \ud83c\udf10 Supported Languages\n\n- **English (en)**: Default, comprehensive translations\n- **Japanese (ja)**: Complete Japanese translations\n\nYou can add support for any language by providing translation dictionaries:\n\n```python\ncustom_translations = {\n \"fr\": {\n \"ok\": \"OK\",\n \"cancel\": \"Annuler\",\n \"yes\": \"Oui\",\n \"no\": \"Non\",\n \"Error\": \"Erreur\",\n \"Warning\": \"Avertissement\"\n }\n}\n```\n\n---\n\n## \ud83d\udcdd License\n\nThis project is licensed under the MIT License. See the LICENSE file for details.\n\n---\n\n## \ud83d\udc68\u200d\ud83d\udcbb Author\n[mashu3](https://github.com/mashu3)\n\n[](https://github.com/mashu3/tkface/graphs/contributors)\n",
"bugtrack_url": null,
"license": null,
"summary": "A comprehensive multilingual GUI extension library for Tkinter with enhanced message boxes, calendar widgets, theme system, and Windows-specific features",
"version": "0.1.0",
"project_urls": {
"Bug Tracker": "https://github.com/mashu3/tkface/issues",
"Documentation": "https://github.com/mashu3/tkface#readme",
"Homepage": "https://github.com/mashu3/tkface",
"Repository": "https://github.com/mashu3/tkface"
},
"split_keywords": [
"tkinter",
" gui",
" multilingual",
" internationalization",
" messagebox",
" dialog",
" calendar",
" theme",
" windows"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "5cabf39213cd34c8502e5813114c3fbe5ccc7d4f2461b450e3259a18d7739d86",
"md5": "a5c7122838adc4454248ccaadf906aab",
"sha256": "979830efc1fd1576a7016a6967e1d543d77424a2974406a9d540acecd9f5994d"
},
"downloads": -1,
"filename": "tkface-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a5c7122838adc4454248ccaadf906aab",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 84550,
"upload_time": "2025-08-28T16:16:03",
"upload_time_iso_8601": "2025-08-28T16:16:03.685153Z",
"url": "https://files.pythonhosted.org/packages/5c/ab/f39213cd34c8502e5813114c3fbe5ccc7d4f2461b450e3259a18d7739d86/tkface-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "b0e865efdf16c914102d430a4526e2978029e2cb5213ef92e4cb08e504c6bccb",
"md5": "ccf192a11b19fdf965dcd4906e8405c0",
"sha256": "bed9fa446df02de39b368c1c73a23d042a5eea33055a06cb06cbb8d7cc36c458"
},
"downloads": -1,
"filename": "tkface-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "ccf192a11b19fdf965dcd4906e8405c0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 80685,
"upload_time": "2025-08-28T16:16:05",
"upload_time_iso_8601": "2025-08-28T16:16:05.421864Z",
"url": "https://files.pythonhosted.org/packages/b0/e8/65efdf16c914102d430a4526e2978029e2cb5213ef92e4cb08e504c6bccb/tkface-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-28 16:16:05",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "mashu3",
"github_project": "tkface",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "tkface"
}