[Lazarus] UI Design Question

Birger Jansen birger at cnoc.nl
Wed Dec 15 10:10:12 CET 2010


>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





More information about the Lazarus mailing list