remi icon indicating copy to clipboard operation
remi copied to clipboard

Feature request: Allow setting button labels on GenericDialog

Open iverks opened this issue 1 year ago • 0 comments

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")

iverks avatar Sep 01 '23 12:09 iverks