我从TComboBox继承一个类,indexs 是一个对象属性,但编译时提示indexs的Getvalue方法类型不匹配,为什么?代码如下:1 type
2 TNewComboBox = class(TComboBox)
3
4 private
5 { Private declarations }
6
7 procedure SetValue( index : Integer ; Value : string ) ;
8 function GetValue(Index : Integer ) : string ;
9
10 public
11 { Public declarations }
12 constructor Create (AOwner : TComponent ) ; override ;
13 destructor Destroy ; override ;
14 property indexs : tstringlist Read GetValue write SetValue ;
15 end;
2 TNewComboBox = class(TComboBox)
3
4 private
5 { Private declarations }
6
7 procedure SetValue( index : Integer ; Value : string ) ;
8 function GetValue(Index : Integer ) : string ;
9
10 public
11 { Public declarations }
12 constructor Create (AOwner : TComponent ) ; override ;
13 destructor Destroy ; override ;
14 property indexs : tstringlist Read GetValue write SetValue ;
15 end;
GetValue 返回的是stringindexs 是tstringlist