The following code (AC 11.14) is in error:
Hello,
I Have the same problem, but to me the Code seems identical?
What would I have to change to make it compile?
Regards
Rolf
Code:
constructor TsNavButton.Create(AOwner: TComponent);
begin
inherited;
ShowCaption := False;
SkinData.SkinManager := TsPanel(AOwner).SkinData.FSkinManager;
SkinData.SkinSection := s_TOOLBUTTON;
Self.DisabledGlyphKind := Self.DisabledGlyphKind + [dgBlended];
Self.DisabledKind := Self.DisabledKind + [dkBlended];
Glyph.Width := 0;
Glyph.Height := 0;
end;
The error is that FSkinManager is a protected property of TsPanel.SkinData.
The code should read:
Code:
constructor TsNavButton.Create(AOwner: TComponent);
begin
inherited;
ShowCaption := False;
SkinData.SkinManager := TsPanel(AOwner).SkinData.SkinManager;
SkinData.SkinSection := s_TOOLBUTTON;
Self.DisabledGlyphKind := Self.DisabledGlyphKind + [dgBlended];
Self.DisabledKind := Self.DisabledKind + [dkBlended];
Glyph.Width := 0;
Glyph.Height := 0;
end;
I hate it, that I had to receive source with a compile error. It shows, that the code was not tested once. :36: