不是高手肯定回答不出的问题 写一个Property Editor,这样才能够向TDatabase那样,或者用TDatabase的那个Property Editor .属性声明没有什么花头。property Alias: string read FAlias write setAlias; 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 找到源码了,贴出来给你。type TDBStringProperty = class(TStringProperty) public function GetAttributes: TPropertyAttributes; override; procedure GetValueList(List: TStrings); virtual; procedure GetValues(Proc: TGetStrProc); override; end;type TDatabaseNameProperty = class(TDBStringProperty) public procedure GetValueList(List: TStrings); override; end;{ TDBStringProperty }function TDBStringProperty.GetAttributes: TPropertyAttributes;begin Result := [paValueList, paSortList, paMultiSelect];end;procedure TDBStringProperty.GetValueList(List: TStrings);beginend;procedure TDBStringProperty.GetValues(Proc: TGetStrProc);var I: Integer; Values: TStringList;begin Values := TStringList.Create; try GetValueList(Values); for I := 0 to Values.Count - 1 do Proc(Values[I]); finally Values.Free; end;end;procedure TDatabaseNameProperty.GetValueList(List: TStrings);begin (GetComponent(0) as TDBDataSet).DBSession.GetDatabaseNames(List);end; 请问delphi7的问题,智能提示,变色 delphi的控件限定取值的问题? dbgrid 如果让下一个单元格自动获得焦点? dbedit获得焦点后数据自动消失,如何解决,先谢了 不安装客户端连接到oracle? FastReport打印MEMO的内容时,如果内容很多,MEMO如何自动扩张? 众高手指教,关于MSComm串口通讯的问题,如何解析二进制数据?急!急!急!不够加分!!! 安装盘的制作 请问:在VB下如何调用已写好的EXE文件(delphi写的)? 菜鸟问题:如何往ADODataset添加TStringfield? 千古悬案:倾囊而出以求一解。。。。:( 的没分了 我的痛苦谁人知?
type
TDBStringProperty = class(TStringProperty)
public
function GetAttributes: TPropertyAttributes; override;
procedure GetValueList(List: TStrings); virtual;
procedure GetValues(Proc: TGetStrProc); override;
end;type
TDatabaseNameProperty = class(TDBStringProperty)
public
procedure GetValueList(List: TStrings); override;
end;{ TDBStringProperty }function TDBStringProperty.GetAttributes: TPropertyAttributes;
begin
Result := [paValueList, paSortList, paMultiSelect];
end;procedure TDBStringProperty.GetValueList(List: TStrings);
begin
end;procedure TDBStringProperty.GetValues(Proc: TGetStrProc);
var
I: Integer;
Values: TStringList;
begin
Values := TStringList.Create;
try
GetValueList(Values);
for I := 0 to Values.Count - 1 do Proc(Values[I]);
finally
Values.Free;
end;
end;procedure TDatabaseNameProperty.GetValueList(List: TStrings);
begin
(GetComponent(0) as TDBDataSet).DBSession.GetDatabaseNames(List);
end;