M
myoldsaturn
Unregistered / Unconfirmed
GUEST, unregistred user!
在“深度历险”中下载的APPBAR控件,OPANEL(在task bar那一类中),在安装时,
源文件定义有以下问题:(各位可去下载后安装试试)
TopPanel = class(TCustomPanel)
private
FTabs: TList;
FActiveTab: TopTab;
FTitle: TopTitle;
FAnimation: boolean;
FSmallCaption: string;
FAutoHide: boolean;
FAlwaysOnTop: boolean;
FSound: TWave;
function GetPageCount: Integer;
function GetTabs(Index: integer): TopTab;
procedure SetActiveTab(Value: TopTab);
procedure SetTitle(Value: TopTitle);
procedure SetAutoHide(Value: boolean);
procedure SetAlwaysOnTop(Value: boolean);
procedure SetSound(Value: TWave);
function isVertical: boolean;
procedure Aligning;
procedure PlaySound;
// Called when the AppBar receives a WM_NCHITTEST message
procedure OnNcHitTest (var Msg: TWMNCHitTest); message WM_NCHITTEST;
protected
procedure Notification(AComponent: TComponent;
Operation: TOperation); override;
function GetClientRect: TRect; override;
procedure AlignControls(AControl: TControl; var Rect: TRect); override;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure Loaded; override;
procedure Paint; override;
// Add/Delete Tab
procedure InsertTab(Tab: TopTab);
procedure DeleteTab(Tab: TopTab);
// Save and Load Setting from/to Registry
procedure SaveSettings;
procedure LoadSettings;
// Add Button
function InsertButton(ATab: TopTab): TopButton;
function InsertSeparator(ATab: TopTab): TopSeparator;
// WM_Resize
procedure WMSize(var Msg: TWMSize); message WM_SIZE;
published
property ActiveTab: TopTab read FActiveTab write SetActiveTab;
property Animation: boolean read FAnimation write FAnimation;
property AutoHide: boolean read FAutoHide write SetAutoHide;
property AlwaysOnTop: boolean read FAlwaysOnTop write SetAlwaysOnTop;
property Font;
property SmallCaption: string read FSmallCaption
write FSmallCaption;
property ShowHint;
property Sound: TWave read FSound write SetSound;
property TabCount: Integer read GetPageCount;
property Tabs[Index: Integer]: TopTab read GetTabs; // 这一行有错,提示如下
property Title: TopTitle read FTitle write SetTitle;
end;
[Error] msofficepanel.pas(226): Published property 'Tabs' cannot be of type ARRAY
function TopPanel.GetTabs(Index: integer): TopTab;
begin
Result := FTabs[Index];
end;
源文件定义有以下问题:(各位可去下载后安装试试)
TopPanel = class(TCustomPanel)
private
FTabs: TList;
FActiveTab: TopTab;
FTitle: TopTitle;
FAnimation: boolean;
FSmallCaption: string;
FAutoHide: boolean;
FAlwaysOnTop: boolean;
FSound: TWave;
function GetPageCount: Integer;
function GetTabs(Index: integer): TopTab;
procedure SetActiveTab(Value: TopTab);
procedure SetTitle(Value: TopTitle);
procedure SetAutoHide(Value: boolean);
procedure SetAlwaysOnTop(Value: boolean);
procedure SetSound(Value: TWave);
function isVertical: boolean;
procedure Aligning;
procedure PlaySound;
// Called when the AppBar receives a WM_NCHITTEST message
procedure OnNcHitTest (var Msg: TWMNCHitTest); message WM_NCHITTEST;
protected
procedure Notification(AComponent: TComponent;
Operation: TOperation); override;
function GetClientRect: TRect; override;
procedure AlignControls(AControl: TControl; var Rect: TRect); override;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure Loaded; override;
procedure Paint; override;
// Add/Delete Tab
procedure InsertTab(Tab: TopTab);
procedure DeleteTab(Tab: TopTab);
// Save and Load Setting from/to Registry
procedure SaveSettings;
procedure LoadSettings;
// Add Button
function InsertButton(ATab: TopTab): TopButton;
function InsertSeparator(ATab: TopTab): TopSeparator;
// WM_Resize
procedure WMSize(var Msg: TWMSize); message WM_SIZE;
published
property ActiveTab: TopTab read FActiveTab write SetActiveTab;
property Animation: boolean read FAnimation write FAnimation;
property AutoHide: boolean read FAutoHide write SetAutoHide;
property AlwaysOnTop: boolean read FAlwaysOnTop write SetAlwaysOnTop;
property Font;
property SmallCaption: string read FSmallCaption
write FSmallCaption;
property ShowHint;
property Sound: TWave read FSound write SetSound;
property TabCount: Integer read GetPageCount;
property Tabs[Index: Integer]: TopTab read GetTabs; // 这一行有错,提示如下
property Title: TopTitle read FTitle write SetTitle;
end;
[Error] msofficepanel.pas(226): Published property 'Tabs' cannot be of type ARRAY
function TopPanel.GetTabs(Index: integer): TopTab;
begin
Result := FTabs[Index];
end;