Search code examples
dialogsmalltalkvisualworks

Smalltalk custom buttons for Dialog


Is there a way to customize the buttons for Dialog?

Dialog confirm has two buttons (yes/no), but I would like to change the value of the buttons to something else other than (yes/no).

I have been looking for ways to do this, but the given Dialog methods are very limited in terms of having customizable buttons.


Solution

  • Try this:

    Dialog choose: 'What is your choice?'
        labels: #('Red' 'Black')
        values: #(#red #black)
        default: #red