rawpython / remi

Python REMote Interface library. Platform independent. In about 100 Kbytes, perfect for your diet.
Apache License 2.0
3.48k stars 401 forks source link

Feature request: Allow setting button labels on GenericDialog #525

Open iverks opened 10 months ago

iverks commented 10 months ago

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