PC Review


Reply
Thread Tools Rate Thread

detecting changes of subproperties

 
 
nicolasr
Guest
Posts: n/a
 
      15th Jan 2007
Hi,

I'm writing a custom control that has several class type
properties, f.e. ImageList, List<string>, StringFormat.
None of these classes seems to provide a 'Change' event.
The result of this is that I don't get notified when the user
edits the subproperties at design time and am unable to
refresh the control reflecting the new values.

Is there a general approach to this problem?
Would I really have to wrap all these classes in my own
classes that double the interface of the wrapped class and
provide Change events?

thanks for any help,
Nick


 
Reply With Quote
 
 
 
 
Marc Gravell
Guest
Posts: n/a
 
      15th Jan 2007
List<T> could possibly be replaced with BindingList<T> which provides
what you need via ListChanged... but nothing reallly for the other 2
:-(

Marc


 
Reply With Quote
 
Ignacio Machin \( .NET/ C# MVP \)
Guest
Posts: n/a
 
      15th Jan 2007
Hi,

"nicolasr" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
| Hi,
|
| I'm writing a custom control that has several class type
| properties, f.e. ImageList, List<string>, StringFormat.
| None of these classes seems to provide a 'Change' event.
| The result of this is that I don't get notified when the user
| edits the subproperties at design time and am unable to
| refresh the control reflecting the new values.
|

AFAIK there is no such a thing for StringFormat at least, you would have to
wrap them

Hey, maybe you can write a general wrapping class using reflectoin that send
an event when a property is changed


--
Ignacio Machin
machin AT laceupsolutions com


 
Reply With Quote
 
nicolasr
Guest
Posts: n/a
 
      17th Jan 2007
thanks both for your answers!
I will see how far I get with that.

Nick


> Hi,
>
> I'm writing a custom control that has several class type
> properties, f.e. ImageList, List<string>, StringFormat.
> None of these classes seems to provide a 'Change' event.
> The result of this is that I don't get notified when the user
> edits the subproperties at design time and am unable to
> refresh the control reflecting the new values.
>
> Is there a general approach to this problem?
> Would I really have to wrap all these classes in my own
> classes that double the interface of the wrapped class and
> provide Change events?
>
> thanks for any help,
> Nick
>



 
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
subproperties =?Utf-8?B?ZWxhZGxh?= Microsoft C# .NET 5 18th Oct 2006 11:00 AM
Assign DataGridView Columns To SubProperties Spam Catcher Microsoft VB .NET 0 10th Oct 2006 05:57 PM
Properties with subproperties in propertygrid? =?Utf-8?B?S2luZ2hlcmM=?= Microsoft Dot NET Framework Forms 3 4th Apr 2006 08:19 AM
detecting HDD Tom Windows XP Hardware 1 21st Apr 2004 01:59 AM
not detecting cd-rom cypher Microsoft Windows 2000 Hardware 1 23rd Aug 2003 10:43 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:42 AM.