Sunday, 8 February 2009

Editfields that update each other

I've been creating a number of EditFields lately where the TextChange event of each updates all the others.

I pretty soon got fed up with wrapping every bit of update code in "alreadyUpdating" flags, so I decided to create a simple EditField subclass with a Changed event that only fires if the EditField has the focus.

As I thought this might be useful for others, I've put a sample project on my website. it uses the subclass to allow entry of hex, binary or decimal numbers, while the two other fields are updated.

I've also added the source to the SVN repository at Google Code.

No comments: