> Hi Chris,
> I do but I may well have made a complete mess of it! (Apologies for
> being an VB developer on a steep learning curve!)
[...]
> Wrong place?? wrong code??
Heheh, I hear ya. It's the wrong code basically.
If you look in the properties of the TreeView in the designer, there's
the Events listing (lightning bolt in your properties window), which is
one way to get at the events. Double clicking inside the value cell in
that list will either create the event handler for you, or take you to
it in code if you already have one.
In the designer.cs file, you should see a section of code with a comment
of "trvRecipe" at the top, where it assigns a bunch of properties to the
object.
In there, you can add a line like:
trvRecipe.AfterCheck += new TreeViewEventhandler(trvRecipe_AfterCheck);
One thing to watch out for, if you have a habit of cut and pasting form
elements, cutting them will remove all the event subscription code.
Chris.
pbaugh@recoilsoft.com - 13 Nov 2007 17:40 GMT
> Heheh, I hear ya. It's the wrong code basically.
>
[quoted text clipped - 15 lines]
>
> Chris.
What a star! Yeah, I'd completely messed up the event handler. After
following your instructions, the whole thing worked perfectly first
time.
Many thanks!!
Pete