So every single time you make a Dialog, there is a createButtonsForButtonBar that you, or WindowMaker will override.
By default, this gives you an OK and Cancel buttons.
The problem:
It would be fine if I could just add custom action to these buttons, but so far I only found limited ways to do this. For example if I add any call to the OK button, it will throw me an exception, that the widget is disposed.
Workaround I used:
So far I managed to just shrink my dialogs, and kept the Override part empty.
This left the bottom part with some empty space, but nothing annoying.
But this is just an ugly workaround and I have to start making smaller dialogs where this is not an option.
What I tried:
- I tried adding buttons directly into the code, inserting them into the
parentof thecreateButtonsForButtonBar. Result: Buttons won't get displayed. - I tried modifying the default buttons, even making
defaultButtonfalse didn't help.
The question:
How do I make the JFace Dialogs buttons useful?
Either