I have a form that extends GridLayout. The form contains several fields for input and a button that opens a dialog.
When I open the form from a grid, the fields are not editable and I have to click the Edit button.
But the button is alwys visible. As it does not make any sense when the form is not editable, I would like to hide the button.
How can I determine, if the form is opened for editing or read-only?
You can see the button beside the non-editable field. The button should not be displayed in this state.
In the second part, I have clicked the “Bearbeiten” button and I now can edit the content of the field. ( either manually of using the dialog behind the button ).
One way of doing that is by setting the button invisible when you create the form and when you click the Abbruch button and make it visible when you click the Bearbeiten button. Something like the following: