I have created a Stylebook component that has a toolbarstyle. All toolbars in my app have this stylelookup. This style consists of a TLayout filled with a TRectangle that has the stylename “background” that has the color red by default.
I want to let the user set the color of the toolbar with a TComboColorBox.
So when they choose a Color I want all the toolbars to change to the color they have picked.
Now I already know how to change the style for a single toolbar, but I don’t want to set the property for each individual toolbar. With the code below I can change the style color for a single toolbar.
ToolBar1.StylesData[‘background.Fill.Color’] := ComboColorBox1.Color;
How can I do the same for all my toolbars at once? I gues change the StyleBook but how. Also the stylebook from my MainForm get’s loaded in all my other forms too, so I also don’t need to change it on every form.