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 expose a property of the ancestor

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





PostPosted: Mon Oct 13, 2003 8:38 am    Post subject: how to expose a property of the ancestor Reply with quote



hi: i have a component that is descendent from another component created by
me: some properties that are published in the ancestor are not visible in
the object inspector for the derived component. How can i expose them?
Thanx in advance.


Back to top
ozbear
Guest





PostPosted: Mon Oct 13, 2003 9:28 am    Post subject: Re: how to expose a property of the ancestor Reply with quote



On Mon, 13 Oct 2003 10:38:39 +0200, "Francesco Savastano"
<francosava (AT) libero (DOT) it> wrote:

Quote:
hi: i have a component that is descendent from another component created by
me: some properties that are published in the ancestor are not visible in
the object inspector for the derived component. How can i expose them?
Thanx in advance.



What do you mean by "some properties" aren't visible?

Not everything is publishable to begin with and those that aren't
won't display properly if you force it. What are the class elements
of the ancestor class that are published and not being republished
in the descendent?

Oz

Back to top
Francesco Savastano
Guest





PostPosted: Mon Oct 13, 2003 9:41 am    Post subject: Re: how to expose a property of the ancestor Reply with quote



Well you just hit the center of my problem:
infact i'm now seeing that i cannot access the same properties of the
ancestor through the object inspector, because they probably are not
publishable and maybe i need to write a new property editor?
Do you have advices on how to write a property editor and register it in
delphi, since i never did this before?

In my case it should not be so difficult since the 2 properties are:

Property XRange:TBasicDiagrammerRange read fXRange write SetXRange;
Property YRange:TBasicDiagrammerRange read fYRange write SetYRange;

where:
TBasicDiagrammerRange=record
startvalue:single;
endvalue:single;
end;

but i would like to get some suggestion on how to do that and how to create
the class of the property editor.
Thank you very much,
Francesco.

"ozbear" <ozbear (AT) no (DOT) bigpond.spam.com> ha scritto nel messaggio
news:3f8a6f79.103372203 (AT) newsgroups (DOT) borland.com...
Quote:
On Mon, 13 Oct 2003 10:38:39 +0200, "Francesco Savastano"
[email]francosava (AT) libero (DOT) it[/email]> wrote:

hi: i have a component that is descendent from another component created
by
me: some properties that are published in the ancestor are not visible
in
the object inspector for the derived component. How can i expose them?
Thanx in advance.



What do you mean by "some properties" aren't visible?

Not everything is publishable to begin with and those that aren't
won't display properly if you force it. What are the class elements
of the ancestor class that are published and not being republished
in the descendent?

Oz



Back to top
Ignacio Vazquez
Guest





PostPosted: Mon Oct 13, 2003 4:16 pm    Post subject: Re: how to expose a property of the ancestor Reply with quote

Hello, Francesco!
You wrote on Mon, 13 Oct 2003 11:41:12 +0200:
Quote:
TBasicDiagrammerRange=record

This could be the problem. Record properties aren't publishable. Convert it
to a class that derives from TPersistent and then take a look at
$(DELPHI)SourceProperty Editors to see how to write a property editor if
you still need one.

Cheers.
Ignacio



Back to top
Francesco Savastano
Guest





PostPosted: Mon Oct 13, 2003 4:55 pm    Post subject: Re: how to expose a property of the ancestor Reply with quote

Ignacio, Thank you very much.
Francesco.



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.