Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added an alert dialog #2168

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

Shahzainali
Copy link

image

Added an alert dialog, created using Ctkinputdialog.

Usage :

dialog = customtkinter.CTkAlertDialog(text="Type in a number:", title="Test")
print("state:", dialog.get_state()) // will return True(Ok) or False(Cancel)

Arguments

same as CTkInputDialog, only last three removed which are related to entry

Methods

.get_state()
Retuns will return True(Ok) or False(Cancel), waits for 'Ok' or 'Cancel' button to be pressed.

@Anonymous6598
Copy link

This is really interesting. Now apps with customtkinter framework won't need using tkinter.messagebox attribute (i forgot the name of the attribute). You should find out how to implement filedialog in customtkinter framework. And after that everything will be perfect.

@Shahzainali
Copy link
Author

I will, but my next is adding info Dialog(with only a button) and the second is taking a parameter of dialog position for showing on the screen.

@Anonymous6598
Copy link

That's great!

@Anonymous6598
Copy link

We need to increase number of customtkinter attributes, therefore we will be able to replace tkinter framework with customtkinter framework.

@zhongyupei666
Copy link

CTKInpuDialog() function, This text_color param is not effect

@zhongyupei666
Copy link

CTKInputDialog() function, This text_color param is not effect

@zhongyupei666
Copy link

CTKInputDialog() function, This text_color param is not effect.

@zhongyupei666
Copy link

dialog = customtkinter.CTkAlertDialog(text="Whether to convert the encoding format to GB2312",title="Warning...")

AttributeError: module 'customtkinter' has no attribute 'CTkAlertDialog'. Did you mean: 'CTkInputDialog'?

@Shahzainali
Copy link
Author

Shahzainali commented Jan 23, 2024

@zhongyupei666 my PR isn't merged yet. you can use it once it is merged.
Or if you want to use it now, download my repo find the path of customtkinter, and replace it with my repo. It will be available instantly I believe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants