PC Review


Reply
Thread Tools Rate Thread

Component develoment

 
 
Claudio
Guest
Posts: n/a
 
      26th Jun 2006
I am developping a component that there are some properties and methods, and
one of these properties has its own properties (ex. A componen name
MYCustomers with the property ADDRESS that has NAME, NUMBER, CITY, ZIPCODE
as its own propertis) How do I create this component in a way that I can
change the ADDRESS properties values at desing time. Does any anyone can
give an example?


 
Reply With Quote
 
 
 
 
Nicholas Paldino [.NET/C# MVP]
Guest
Posts: n/a
 
      26th Jun 2006
Claudio,

To the property, you want to add the following attribute:

[TypeConverter(typeof(ExpandableObjectConverter))]

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (E-Mail Removed)

"Claudio" <(E-Mail Removed)> wrote in message
news:e$(E-Mail Removed)...
>I am developping a component that there are some properties and methods,
>and one of these properties has its own properties (ex. A componen name
>MYCustomers with the property ADDRESS that has NAME, NUMBER, CITY, ZIPCODE
>as its own propertis) How do I create this component in a way that I can
>change the ADDRESS properties values at desing time. Does any anyone can
>give an example?
>



 
Reply With Quote
 
Claudio
Guest
Posts: n/a
 
      26th Jun 2006
This my component.

public class MeuClienteInfo : Component
{

string nome;

EnderecoInfo endereco; // Objeto Endereco


protected internal MeuClienteInfo()

{

InitializeComponent();

}



public MeuClienteInfo(IContainer container)

{

container.Add(this);

InitializeComponent();

}

public string Nome

{

get { return this.nome; }

set { this.nome = value; }

}



public EnderecoInfo Endereco

{

get { return this.endereco; }

set { this.endereco = value; }

}

}

public class EnderecoInfo

{

string rua;

int numero;

string bairro;



public string Rua

{

get { return this.rua; }

set { this.rua = value; }

}



public int Numero

{

get { return this.numero; }

set { this.numero = value ; }

}



public string Bairro

{

get { return this.bairro; }

set { this.bairro = value; }

}

}



"Nicholas Paldino [.NET/C# MVP]" <(E-Mail Removed)> escreveu
na mensagem news:(E-Mail Removed)...
> Claudio,
>
> To the property, you want to add the following attribute:
>
> [TypeConverter(typeof(ExpandableObjectConverter))]
>
> Hope this helps.
>
>
> --
> - Nicholas Paldino [.NET/C# MVP]
> - (E-Mail Removed)
>
> "Claudio" <(E-Mail Removed)> wrote in message
> news:e$(E-Mail Removed)...
>>I am developping a component that there are some properties and methods,
>>and one of these properties has its own properties (ex. A componen name
>>MYCustomers with the property ADDRESS that has NAME, NUMBER, CITY, ZIPCODE
>>as its own propertis) How do I create this component in a way that I can
>>change the ADDRESS properties values at desing time. Does any anyone can
>>give an example?
>>

>
>



 
Reply With Quote
 
Claudio
Guest
Posts: n/a
 
      26th Jun 2006
It worked fine. Thank you very much.
"Nicholas Paldino [.NET/C# MVP]" <(E-Mail Removed)> escreveu
na mensagem news:(E-Mail Removed)...
> Claudio,
>
> To the property, you want to add the following attribute:
>
> [TypeConverter(typeof(ExpandableObjectConverter))]
>
> Hope this helps.
>
>
> --
> - Nicholas Paldino [.NET/C# MVP]
> - (E-Mail Removed)
>
> "Claudio" <(E-Mail Removed)> wrote in message
> news:e$(E-Mail Removed)...
>>I am developping a component that there are some properties and methods,
>>and one of these properties has its own properties (ex. A componen name
>>MYCustomers with the property ADDRESS that has NAME, NUMBER, CITY, ZIPCODE
>>as its own propertis) How do I create this component in a way that I can
>>change the ADDRESS properties values at desing time. Does any anyone can
>>give an example?
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
The system has called a custom component and that component has failed and generated an exception. lil_miss_sassy_girl@yahoo.com Microsoft Windows 2000 Developer 0 31st Jan 2005 05:23 PM
error 1109: component: 'session manager requires an additional enabled component not in the current configuration msnews.microsoft.com Windows XP Customization 1 14th May 2004 05:23 PM
error 1109: component: 'session manager requires an additional enabled component not in the current configuration msnews.microsoft.com Windows XP Basics 1 14th May 2004 05:23 PM
error 1109: component: 'session manager requires an additional enabled component not in the current configuration msnews.microsoft.com Windows XP Embedded 1 14th May 2004 05:23 PM
missing file.... microsft develoment debugging Gary Windows XP General 0 15th Feb 2004 02:44 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:22 PM.