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

Feature request: Allow setting button labels on GenericDialog #525

Open
iverks opened this issue Sep 1, 2023 · 0 comments
Open

Feature request: Allow setting button labels on GenericDialog #525

iverks opened this issue Sep 1, 2023 · 0 comments

Comments

@iverks
Copy link

iverks commented Sep 1, 2023

As of now the button labels on GenericDialog are hard coded as "Cancel" and "Ok". It would be very nice if it was possible to change them, e.g.

dialog = gui.GenericDialog(
    title="Red pill or blue pill", 
    message="This is your last chance. After this, there is no turning back. You take the blue pill - the story ends, you wake up in your bed and believe whatever you want to believe. You take the red pill - you stay in Wonderland and I show you how deep the rabbit hole goes.",
    cancel_label="Blue pill",
    confirm_label="Red pill",
)

EDIT: I found out that it is possilbe to hack using

dialog.conf.set_text("Red pill")
dialog.cancel.set_text("Blue pill")
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

No branches or pull requests

1 participant