Z
zql123
Unregistered / Unconfirmed
GUEST, unregistred user!
自己编写的组件中定义的FFilter:string,怎样才能和TFilterComBoBox.Filter的类型一致?当单击"..."编辑按钮时TFilterComBoBox.Filter会出现“Filter Editor”编辑窗口,而我的组件只是出现“String Editor”。
我组件中FFilter 的定义和实现如下:
private
FFilter : string;
published
property Filter : string read FFilter write SetFilter ;
implementation
procedure SetFilter(const Value: String);
begin
if AnsiCompareFileName(Value, FFilter) <> 0 then
FFilter := Value;
end;
constructor TlzqINIFilter.Create(AOwner: TComponent);
begin
inherited;
FFilter := SDefaultFilter;
end;
请写代码回答
我组件中FFilter 的定义和实现如下:
private
FFilter : string;
published
property Filter : string read FFilter write SetFilter ;
implementation
procedure SetFilter(const Value: String);
begin
if AnsiCompareFileName(Value, FFilter) <> 0 then
FFilter := Value;
end;
constructor TlzqINIFilter.Create(AOwner: TComponent);
begin
inherited;
FFilter := SDefaultFilter;
end;
请写代码回答