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 

Getting rid of Tag property in Subcomponents

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





PostPosted: Sun Nov 23, 2003 6:49 pm    Post subject: Getting rid of Tag property in Subcomponents Reply with quote



Hi,

I am working on a component which uses various subcomponents to structure
its properties. These subcomponents are based on TComponent and call
SetSubcomponent(true) in their constructor. Everything works so far, but in
the object inspector the Tag properties of those subcomponents is visible.
I would like them not to be shown there.

Any hints?

regards
twm

Back to top
Maris Janis Vasilevskis
Guest





PostPosted: Sun Nov 23, 2003 8:23 pm    Post subject: Re: Getting rid of Tag property in Subcomponents Reply with quote



RegisterPropertyEditor(TypeInfo(LongInt), TMyComponent, 'Tag', nil);

Mahris

Thomas Mueller wrote:

Quote:
Hi,

I am working on a component which uses various subcomponents to structure
its properties. These subcomponents are based on TComponent and call
SetSubcomponent(true) in their constructor. Everything works so far, but in
the object inspector the Tag properties of those subcomponents is visible.
I would like them not to be shown there.

Any hints?

regards
twm



Back to top
Maris Janis Vasilevskis
Guest





PostPosted: Sun Nov 23, 2003 9:12 pm    Post subject: Re: Getting rid of Tag property in Subcomponents Reply with quote



Sorry, I (as usually) forgot that it is C++ group.

#include <DesignIntf.hpp>

PPropInfo pPropInfo = ::GetPropInfo(__typeinfo(TMyComponent), "Tag");
RegisterPropertyEditor(*(pPropInfo->PropType),__classid(TMyComponent),"Tag",0);

And you should split into runtime and designtime packages, if not done yet.

Mahris

Back to top
Thomas Mueller
Guest





PostPosted: Sun Nov 23, 2003 11:16 pm    Post subject: Re: Getting rid of Tag property in Subcomponents Reply with quote

Hi,

Maris Janis Vasilevskis wrote:

Quote:
Sorry, I (as usually) forgot that it is C++ group.

This is the Delphi group. Wink
Thanks for the reply. I'll try it tomorrow at work.

Quote:
And you should split into runtime and designtime packages, if not done
yet.

Hm, I don't like that very much. I'd have to build a designtime package for
just this one function call (there isn't any other designtime stuff there).
On the other hand, maybe I should start this one Package cleanly since most
of my other packages are a mess out of historical reasons which will sooner
or later turn around and bite me.

regards
twm


Back to top
Maris Janis Vasilevskis
Guest





PostPosted: Thu Nov 27, 2003 4:47 am    Post subject: Re: Getting rid of Tag property in Subcomponents Reply with quote

If you build your packages for others, you should split.
If you build for yourself only, but you work with runtime packages,
you should split.

However, if your packages are for yourself only, and you use them
only in applications without runtime packages, you can leave it as is.

In this case, your package is used as package only at design time.
Your application does not use package, it uses set of units.
Be sure that your application does not use unit with Register,
that's all.

Mahris

Thomas Mueller wrote:
Quote:
Maris Janis Vasilevskis wrote:
And you should split into runtime and designtime packages, if not done
yet.

Hm, I don't like that very much. I'd have to build a designtime package for
just this one function call (there isn't any other designtime stuff there).
On the other hand, maybe I should start this one Package cleanly since most
of my other packages are a mess out of historical reasons which will sooner
or later turn around and bite me.


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.