[Lazarus] UI Design Question

Leonardo M. Ramé l.rame at griensu.com
Wed Dec 15 13:48:58 CET 2010


On 2010-12-15 10:10:12 +0100, Birger Jansen wrote:
> >To solve this, I'm thinking on creating many TFrames containing one
> >toolbar each (and one TActionList also), and create an instance of the
> >needed  one when a VIEW is activated.
> >
> > How would you architect this?
> 
> I would register the possible actions for each VIEW in the same unit as where the view is defined. When the view is activated / opened the list containing the possible actions (you could use an actionlist for that) is parsed and in the main toolbar the right buttons are added (after the old buttons are deleted). I would do as much as possible in code instead of using designers so it is easier to maintain in SVN.
> 
> No need for a separate frame.
> 
> This is what we do in Delphi, it should also be possible with Lazarus.
> 
> Groet,
>   Birger
> 
> 
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

I like the idea, the only drawback I see is that I'll have to write by
hand the code I should create with the designer, but I like it.

-- 
Leonardo M. Ramé
http://leonardorame.blogspot.com




More information about the Lazarus mailing list