Milchreis / UiBooster

🚀 Creates fast and easy dialogs for utility tools
GNU General Public License v3.0
117 stars 12 forks source link

TextInput Dialog don't allow button controls #57

Closed RachidLeLaborantin closed 3 years ago

RachidLeLaborantin commented 3 years ago

I want to perform some action when user clicks on Cancel Button It don't close the dialog but do the same thing as the OK button I want to edit again the button text The title of dialog frame is can't be changed again

Milchreis commented 3 years ago

hi rachid,

thank you for your issue. I think the TextInputDialog is not the right tool for your need. There is no customization, because it's a basic dialog. If you want a more complex behaviour, you have to build the dialog with the Form tool:

final Form form = booster.createForm("Dialog title")
            .addText("label", "initial text if needed")
            .show();

Moreover you can use the ChangeListener for inputs (see example) and change properties of the the form elements.

But custom controls for the "OK" and "close" buttons are not supported in Forms, too. If you want this special behaviour, add the buttons for your self with .addButton() und start the form with .run() instead of .show()