Hello I have created a procedure to create and set some styler components:
procedure CreateAndSetRibbonStyler(const aForm: TForm);
var
AdvToolBarOfficeStyler1: TAdvToolBarOfficeStyler;
AdvPreviewMenuOfficeStyler1: TAdvPreviewMenuOfficeStyler;
i: Integer;
begin
AdvToolBarOfficeStyler1 := TAdvToolBarOfficeStyler.Create(aForm);
AdvToolBarOfficeStyler1.Style := bsWindows8;
AdvPreviewMenuOfficeStyler1 := TAdvPreviewMenuOfficeStyler.Create(aForm);
AdvPreviewMenuOfficeStyler1.Style := psWindows8;
for i := 0 to aForm.ComponentCount - 1 do
begin
if aForm.Components is TAdvToolBarPager then
TAdvToolBarPager(aForm.Components).ToolBarStyler := AdvToolBarOfficeStyler1
else if aForm.Components is TAdvPreviewMenu then
TAdvPreviewMenu(aForm.Components).Styler := AdvPreviewMenuOfficeStyler1
end;
end;
I add this code to the OnCreate event of the forms with ribbon controls. But the style is only half used. The background and the preview menu has windows 8 style. The buttons in the ribbon has the default style. Did I missing something? AdvToolBarPager1.Invalidate; does'nt help.