473,399 Members | 2,278 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Creating embedded classes .NET components

I am creating a component and I want one of my properties to be an embedded
class with its own properties. When the component designer shows this
property I want it to be able to expand this property in-line to enable the
end-user to set its values. While my component is derived from
System::ComponentModel::Component, my embedded class has to be derived from
something else in order for it to be shown as an embedded class but be
serializable and marshallable at the same time. What is this something else
? Does my embedded class need to be of a value type to be embedded in this
way or does it just need to be derived from a different .NET framework base
class ?

As an example in C++ Builder, if I derived my component from TComponent, it
was treated as a component. If I derived my class from TPersistent, it was
treated as an embeddable class. What is the .NET equivalent to the latter ?
Jul 21 '05 #1
3 1412
http://msdn.microsoft.com/library/en...etpropbrow.asp
Make Your Components Really RAD with Visual Studio .NET Property Browser
Summary: This article will help you explore the Microsoft Visual Studio .NET
property browser and take advantage of its new features. (23 printed pages)

Check out this section:
Expandable Properties and String Conversion: TypeConverters and the Property
Browser
One of the great features of the Visual Studio .NET property browser is the
ability to display nested properties, allowing for a more granular and
logical level of grouping than categories. Nested properties are also
available in both categorized and alphabetical sort mode. It helps keep
property lists compact-instead of both a Left and Top property, just a
Location property that is expandable into X and Y will do for a separate
entry.
--
Greetz
Jan Tielens
________________________________
Read my weblog: http://weblogs.asp.net/jan
"Edward Diener" <ed******@tropicsoft.com> wrote in message
news:eH**************@TK2MSFTNGP09.phx.gbl...
I am creating a component and I want one of my properties to be an embedded class with its own properties. When the component designer shows this
property I want it to be able to expand this property in-line to enable the end-user to set its values. While my component is derived from
System::ComponentModel::Component, my embedded class has to be derived from something else in order for it to be shown as an embedded class but be
serializable and marshallable at the same time. What is this something else ? Does my embedded class need to be of a value type to be embedded in this
way or does it just need to be derived from a different .NET framework base class ?

As an example in C++ Builder, if I derived my component from TComponent, it was treated as a component. If I derived my class from TPersistent, it was
treated as an embeddable class. What is the .NET equivalent to the latter ?

Jul 21 '05 #2
Jan Tielens wrote:
http://msdn.microsoft.com/library/en...etpropbrow.asp
Make Your Components Really RAD with Visual Studio .NET Property
Browser Summary: This article will help you explore the Microsoft
Visual Studio .NET property browser and take advantage of its new
features. (23 printed pages)
Thanks for the link. I see I have the article on my own local copy of MSDN
and I will take a look at it. If I still can't find answers in the article,
I will continue this thread or repost.

Check out this section:
Expandable Properties and String Conversion: TypeConverters and the
Property Browser
One of the great features of the Visual Studio .NET property browser
is the ability to display nested properties, allowing for a more
granular and logical level of grouping than categories. Nested
properties are also available in both categorized and alphabetical
sort mode. It helps keep property lists compact-instead of both a
Left and Top property, just a Location property that is expandable
into X and Y will do for a separate entry.

"Edward Diener" <ed******@tropicsoft.com> wrote in message
news:eH**************@TK2MSFTNGP09.phx.gbl...
I am creating a component and I want one of my properties to be an
embedded class with its own properties. When the component designer
shows this property I want it to be able to expand this property
in-line to enable the end-user to set its values. While my component
is derived from System::ComponentModel::Component, my embedded class
has to be derived from something else in order for it to be shown as
an embedded class but be serializable and marshallable at the same
time. What is this something else ? Does my embedded class need to
be of a value type to be embedded in this way or does it just need
to be derived from a different .NET framework base class ?

As an example in C++ Builder, if I derived my component from
TComponent, it was treated as a component. If I derived my class
from TPersistent, it was treated as an embeddable class. What is the
.NET equivalent to the latter ?

Jul 21 '05 #3
Jan Tielens wrote:
http://msdn.microsoft.com/library/en...etpropbrow.asp
Make Your Components Really RAD with Visual Studio .NET Property
Browser Summary: This article will help you explore the Microsoft
Visual Studio .NET property browser and take advantage of its new
features. (23 printed pages)
That doesn't really answer my question. Let's see if I can put it another
way.

Let's call my main component, with properties, X.
I want to create two different types of properties:

1) This property called Y is a reference to another component Z. The
property gets set at component design time by the end-user dropping the
component Z into the component editor, setting Z's properties, then setting
Y to be the Z.

2) This property called A is an actual sub-component of X. The property gets
set at component design time by the end-user expand the sub-component and
setting its property values.

Does property A have to be a value type ( struct in C#, __value class in
MC++ ) in order to be a sub-component ? If not, how do I distinguish between
the case where my property is a reference to another component or a
sub-component itself ?

I hope this is clear.

"Edward Diener" <ed******@tropicsoft.com> wrote in message
news:eH**************@TK2MSFTNGP09.phx.gbl...
I am creating a component and I want one of my properties to be an
embedded class with its own properties. When the component designer
shows this property I want it to be able to expand this property
in-line to enable the end-user to set its values. While my component
is derived from System::ComponentModel::Component, my embedded class
has to be derived from something else in order for it to be shown as
an embedded class but be serializable and marshallable at the same
time. What is this something else ? Does my embedded class need to
be of a value type to be embedded in this way or does it just need
to be derived from a different .NET framework base class ?

As an example in C++ Builder, if I derived my component from
TComponent, it was treated as a component. If I derived my class
from TPersistent, it was treated as an embeddable class. What is the
.NET equivalent to the latter ?

Jul 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Troy | last post by:
Hi- I am attempting to set up an RSS feed using PHP. It would be convenient for me to embed PHP into an xml file like I would do to an HTML file in order to create the XML, however the apache...
1
by: billym | last post by:
Is there any information on building BLL middle tier applications to run in an MSCS configuration? IOW, I am not just interested in scalability but fault tolerence as well but am unsure if there...
1
by: Vetrivel | last post by:
Application architecture : Develop interface between two existing systems, a. Enterprise CRM system b. Web based intranet system. Environment : Intranet Server : IIS and ASP. Script :...
1
by: Tom Tempelaere | last post by:
Hi people, Somewhere in the near future I will have to develop a kernel for an industrial printer. Some parts of the kernel have real-time constraints, other parts do not. The kernel should be...
1
by: John Cosmas | last post by:
I am new to .NET 2003 and I'm having trouble locating answers. I need to run a initiate a set of classes, or rather load some initial values into an array - data originates from a database. Then...
3
by: Edward Diener | last post by:
I am creating a component and I want one of my properties to be an embedded class with its own properties. When the component designer shows this property I want it to be able to expand this...
12
by: Mats Lycken | last post by:
Hi, I'm creating a CMS that I would like to be plug-in based with different plugins handling different kinds of content. What I really want is to be able to load/unload plugins on the fly without...
4
by: Scott McNair | last post by:
Hi, I'm creating a user control that has absolutely no visual pieces to it... it's essentially a piece that sniffs a serial port awaiting incoming data. I know that there are several controls...
0
MrMancunian
by: MrMancunian | last post by:
How to create a database connection without using wizards Introduction I've seen a lot of questions on the net about getting data from, and saving data to databases. Here's a little insight how...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.