Mike Kent wrote: > > Now, you might say that this is exactly the intended way to change the > behavior of the grid widget. But this seemed to me to be an ugly, > hackish way to go about it, when all I wanted to do was add one column > to the grid. By using a more flexible set of widgets, not only can I > easily add a column to my table, but I can apply the attribute I want > specifically to the elements of the table where I want them.
Well, I don't feel it as an ugly or hackish solution, IMO it's just the right thing to do (Kevin provided the template attribute just for this reason). In the future I hope it will become a pretty straightforward step. I think the basic idea is that a widget is a well defined component: - visual aspect (template + css) - behavior (python + js), you should be able to customize it, but only to some degree. If you need a new column or a different behavior you should write your own widget (maybe using another as base class). Your solution it's indeed flexible, but probably too much and I find it pretty difficult to use compared to TG widgets, as Kevin said it really seems like Stan. What I mean is that you can simply look at a TG widget template to grasp how it works, if you start adding different layout classes here and there is becomes much more difficult. But, anyway what really matters is that you can still use your own solution together with TG and be happy with it. ;-) It's really difficult (or better, impossible) to find a solution that works for everyone. Ciao Michele

