Skip to content

About

Custom Message Box is a simple and modern library for creating custom dialog boxes with CustomTkinter. It allows you to easily retrieve user responses (entries, confirmations, multiple choices) without having to manipulate complex classes.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Custom Message Box library

Python Version License Status OS CustomTkinter

📝 Description

Custom Message Boxis simple and modern library to create custom dialog boxes with CustomTkinter. It allows you to easily retrieve user responses (inputs, confirmations, multiple choices) without having to deal with complex classes.

🖼️ Screenshoots

Screenshoot.

📦 Features

  • Information & Error: Simple notification boxes.
  • Yes/No: Confirmation dialog boxes.
  • Entry: Dialog boxes with text input.
  • Custom: Dialog boxes with 2 customized buttons.

🛠️ Installation

Make sure you have CustomTkinter installed:

pip install customtkinter

Install the library:

pip install Custom-message-box

Or download the script.

🚀 Usage

Quick start guide:

  • Information Message
custom_message_box.ctkinfo("Title", "Operation successful!")
  • Error Message
custom_message_box.ctkerror("Warning", "Connection lost.")
  • Confirmation Window Returns 1 for Yes and 0 for No.
response = custom_message_box.ctk_msg_yesno("Exit", "Do you really want to leave?")
  • Text Input Returns the entered string.
username = custom_message_box.ctk_msg_entry("Username", "Enter your name:", "e.g., John")
  • Custom Buttons Returns the text of the clicked button.
choice = custom_message_box.ctk_msg_custom("Menu", "Choose an option:","Play", "Options", "Exit")

💻 Full Integration Example

import custom_message_box.cmb as cmb

# 1. Test Entry
entry_response = cmb.ctk_msg_entry("Title", "Enter something:", "Placeholder")
print(entry_response)

# 2. Test YesNo
yesno_response = cmb.ctk_msg_yesno("Confirm", "Are you sure?")
print(yesno_response)

# 3. Test Custom (Title, Message, Text1, Text2)
custom_response = cmb.ctk_msg_custom("Choice", "Select one:", "Option 1", "Option 2")
print(custom_response)

# 4. Test Info
cmb.ctkinfo("Info", "Everything is OK!")

# 5. Test Error
cmb.ctkerror("Danger", "Something went wrong!")

Good programing !

About

Custom Message Box is a simple and modern library for creating custom dialog boxes with CustomTkinter. It allows you to easily retrieve user responses (entries, confirmations, multiple choices) without having to manipulate complex classes.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages