 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Thomas Mueller Guest
|
Posted: Sun Nov 23, 2003 6:49 pm Post subject: Getting rid of Tag property in Subcomponents |
|
|
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
|
Posted: Sun Nov 23, 2003 8:23 pm Post subject: Re: Getting rid of Tag property in Subcomponents |
|
|
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
|
Posted: Sun Nov 23, 2003 9:12 pm Post subject: Re: Getting rid of Tag property in Subcomponents |
|
|
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
|
Posted: Sun Nov 23, 2003 11:16 pm Post subject: Re: Getting rid of Tag property in Subcomponents |
|
|
Hi,
Maris Janis Vasilevskis wrote:
| Quote: | Sorry, I (as usually) forgot that it is C++ group.
|
This is the Delphi group.
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
|
Posted: Thu Nov 27, 2003 4:47 am Post subject: Re: Getting rid of Tag property in Subcomponents |
|
|
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 |
|
 |
|
|
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
|
|