BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to make designer see a datasource property on mycomponen

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi VCL Components Writing
View previous topic :: View next topic  
Author Message
Ivano P Mucci
Guest





PostPosted: Mon Aug 11, 2003 6:17 pm    Post subject: How to make designer see a datasource property on mycomponen Reply with quote



Hi, I have a component that has a property DataSource, it is created
internaly.

I need a way to choose that DataSource in DBEdit control as its Datasource.

is it possible?

thanks,
Ivano P Mucci



Back to top
D Whaley
Guest





PostPosted: Mon Aug 11, 2003 6:39 pm    Post subject: Re: How to make designer see a datasource property on mycomp Reply with quote



I think you will have to make the datasource's Owner, the form.


Back to top
Ivano P Mucci
Guest





PostPosted: Mon Aug 11, 2003 7:03 pm    Post subject: Re: How to make designer see a datasource property on mycomp Reply with quote



Doing like you sad there is a problem... it changes the form source and dfm,
adding the name of datasource like as if i droped the datasource myselft in
the form... the result access violations...:

Quote:
form unit:
TForm2 = class(TForm)

IJvQuery1: TIJvQuery;
IJvQuery1_DTS: TDataSource;
private

Quote:
component unit:

constructor TIQuery.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
FDataSource := TDataSource.Create(AOwner);
end;

procedure TIQuery.SetName;
begin
inherited;
DataSource.Name := Name+'_DTS';
end;




Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi VCL Components Writing All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.