Sometimes it would be really good if more than one GP could disable a button. I’d envisage the standard “+” / “x” icons (below) to allow GPs to be added or removed in the middle of this example section below:
That particular set of configurers (adding a group of things into a list) makes it more needing of @Brent_Easton efforts (Brent the whole thing is in AbstractToolbarItem if you end up having time to take a look)
There is a standard configurer- NamedKeyStrokeArrayConfigurer - that you can drop in via a static class implementing ConfigurerFactory. It saves it values as a comma delimited list, so a single property name automatically gets converted to a list of one property.
Hows do the multiple properties interact? Is the button disabled when any of the properties are true? or when all of the properties are true? or when at least X of the properties are true?
No. No Calculator Icon on that field, so no expressions.
That field can only be a Global Property name and it is used to set a Property Change Listener on the named Global property so that as soon as the GP changes value, the button is notified and it refreshes itself to show it is disabled and prevents anyone clicking on it…
It would be possible to change that field to be an expression instead (essentially a Calculated Property), but there is no way to ‘listen’ for changes to a Calculated Property, so the the button would not appear to change after the disable conditions are met. We would have to add a check in the button push code to say ‘Oops, we where actually disabled, sorry, can’t do that’. It would not be a good user experience.