Checking if a property of a widget has changed

  • Thread starter Thread starter ingoberben
  • Start date Start date
I

ingoberben

Hi, I'm currently working on a project (UIML.NET) where I need to
detect dynamically when a property of a widget has changed. Currently
I'm just registering all events the widget can throw, is there a
better way to do this?

So I need a mechanism that when for example a checkbox is enabled or
checked or so, it will notify me that this has happened...

(I have to make it in .NET 1.0 or .NET 1.1, if it is too
difficult, .NET 2.0 is fine too; extra remark => it also needs to work
on .NET CF 1.0 or 2.0).

Kind regards
 
I assume this widget is one for which you do not have the code, that you
could modify? If you did, it would be pretty easy to have it throw one more
event, a generic change event, and then your external code would only have
to watch that one event instead of all of them. One other possibility you
can consider is creating a derived widget that wraps up this functionality.
The derived widget would watch all the events of interest, and throw one
single event for your external code.
 
Hi Brian

Tnx for your reply! The problem I have is that I can only access the
widget (with reflection) at runtime.
The widget is indeed a widget without code I can modify (like a
button, or a checkbox, textbox, ...).
Creating a wrapper could be possible, but then you need IlGenerator to
write code at runtime (or not?).
And this is not supported on .NET CF, so it's not an option.
 
Back
Top