Expandable Sections [message #519102] |
Sat, 06 March 2010 14:44 |
|
Hi all
Those of you who read the scout blog have probably saw that it is now possible to define a section as expandable. I like this new feature a lot but there is something I would like to discuss: The default of the property 'expandable' is set to true, so if you ugrade scout in your swt project suddenly all sections are expandable.
Maybe you don't care about that. Maybe you say: Great thats exactly what I need and I don't even have to do something! Or maybe you know that your customer doesn't want that at all or at only one form and you have to modify every groupbox in your project so that it looks and feels like before.
I don't say the property has the wrong default value. I just want to ask how do you think about it.
In my opinion it is good if the default properties fit the needs of the most of us. But I think it should be possible that a project can easily modify this behaviour if they don't like it. Particularly if the default used to be another one.
What do you think about it? Is it necessary that scout provides a possibility to change default properties? Or should the project itself care about it? One way to change this behaviour in your project would be to extend the default Gui-Groupbox and bypass the existing logic. This works fine if you don't want expandable sections at all. If you need at least one expandable section you have to extend the model-groupbox too and create a custom property because the gui does not know if the model-component uses the default or overrides the default.
Do you know another way to change such default behaviours?
I apologise for the long text but in my opinion this is an important topic since I've had several discussions about default behaviours in the last months and I would like to avoid them in the future:-)
Regards
Claudio
|
|
|
|
|
|
Re: Expandable Sections [message #520035 is a reply to message #519102] |
Wed, 10 March 2010 21:54 |
|
Hi all
Thanks for your replies!
I think the template pattern is a good way to handle such things. With the help of search / replace it shouldn't even be a big deal to update the existing code, if necessary
Regards
Claudio
|
|
|
Powered by
FUDForum. Page generated in 0.03575 seconds