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 create a particular property

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





PostPosted: Thu Oct 09, 2003 8:43 pm    Post subject: How create a particular property Reply with quote



Hi,
i have created and registered a class named ONE(TComponent) and another
class named TWO(TComponent).
I put some component ONE on a form and a component TWO.
I need to create a property named REF on component TWO and, at run-time, i
would like to select the name of one of the component ONE that i put on my
form, when i click on property REF.
It is like the connection to database...if i put some connection on a form
and i put a query, i can select on my query, the name of one of connections
present.
Can someone give me a simple example for resolve this with my classes ?

Thank you.



Back to top
Ignacio Vazquez
Guest





PostPosted: Thu Oct 09, 2003 8:44 pm    Post subject: Re: How create a particular property Reply with quote



"Elvis" <elvispa (AT) libero (DOT) it> wrote in message
[email]3f85c870 (AT) newsgroups (DOT) borland.com[/email]...
Quote:
i have created and registered a class named ONE(TComponent) and another
class named TWO(TComponent).
I put some component ONE on a form and a component TWO.
I need to create a property named REF on component TWO and, at run-time, i
would like to select the name of one of the component ONE that i put on my
form, when i click on property REF.
It is like the connection to database...if i put some connection on a form
and i put a query, i can select on my query, the name of one of
connections present.
Can someone give me a simple example for resolve this with my classes ?

Make the property REF of type ONE.

Cheers,
Ignacio

--
No, don't send me e-mail directly. No, just don't.



Back to top
Elvis
Guest





PostPosted: Thu Oct 09, 2003 8:49 pm    Post subject: Re: How create a particular property Reply with quote



I need an example becouse i don't know how can do.
Thanx.


Back to top
Ignacio Vazquez
Guest





PostPosted: Thu Oct 09, 2003 8:52 pm    Post subject: Re: How create a particular property Reply with quote

"Elvis" <elvispa (AT) libero (DOT) it> wrote in message
[email]3f85c9bc (AT) newsgroups (DOT) borland.com[/email]...
Quote:
I need an example becouse i don't know how can do.
Thanx.

type
TWO=class(TComponent)
...
property REF: ONE ...
...
end;

Cheers,
Ignacio

--
No, don't send me e-mail directly. No, just don't.



Back to top
Elvis
Guest





PostPosted: Fri Oct 10, 2003 9:21 am    Post subject: Re: How create a particular property Reply with quote

"Ignacio Vazquez" <ivazquezATorioncommunications.com> wrote

Quote:
"Elvis" <elvispa (AT) libero (DOT) it> wrote in message
[email]3f85c9bc (AT) newsgroups (DOT) borland.com[/email]...
I need an example becouse i don't know how can do.
Thanx.

type
TWO=class(TComponent)
...
property REF: ONE ...
...
end;

Cheers,
Ignacio

Thank you very much IGnacio!

I have also another problem... If i set the property REF and i delete
the object "ONE" associated to my property, i have an error "Access
violation at address ...".
Can someone tell me how can i clear the value of REF, when the object
ONE associated is delete ?

Thankx.

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.