On Jul 5, 6:52 am, "Cor Ligthert [MVP]" <notmyfirstn...@planet.nl>
wrote:
> Jan,
>
[quoted text clipped - 29 lines]
>
> >https://mvp.support.microsoft.com/profile/Jan.Hyde
> Although I did not check it, the Find is also to find in a collection, not
> to find a child in a collection.
Controls.Find has a searchAllChildren bool parameter that you can use
to specify a recursive search.
Thanks,
Seth Rowe
JohnR - 05 Jul 2007 17:37 GMT
Hi all,
Thanks for the great replies. Looks like Control.find will do what I want,
but that method was introduced in .NET 2.0 and we have not upgraded yet.
So, I'll continue doing it manually (at least it works), until we upgrade
later this year.
Thanks again...
> On Jul 5, 6:52 am, "Cor Ligthert [MVP]" <notmyfirstn...@planet.nl>
> wrote:
[quoted text clipped - 48 lines]
>
> Seth Rowe
Kerry Moorman - 05 Jul 2007 20:52 GMT
JohnR,
If you need to do this for several controls, then you could scan all the
controls on the form once, adding the control to a hashtable and using the
control's name as the key.
Once all the controls are in the hashtable, you could access them by the
hashtable's key, the name of the control.
But this won't gain you any performance benefit if you just need to access
one control by name one time in your app.
Kerry Moorman
> Hi all,
>
[quoted text clipped - 56 lines]
> >
> > Seth Rowe
JohnR - 06 Jul 2007 00:29 GMT
Hi Kerry,
Ya know, that's a great idea. That's exactly what I'll do.
Thanks, John
> JohnR,
>
[quoted text clipped - 76 lines]
>> >
>> > Seth Rowe
rowe_newsgroups - 06 Jul 2007 11:55 GMT
On Jul 5, 3:52 pm, Kerry Moorman
<KerryMoor...@discussions.microsoft.com> wrote:
> JohnR,
>
[quoted text clipped - 70 lines]
>
> > > Seth Rowe
You might also want to subscribe to the form's controladded event and
add any dynamically created controls that were created after your scan
to your hashtable.
Thanks,
Seth Rowe
Cor Ligthert [MVP] - 05 Jul 2007 18:21 GMT
Seth
I had the plan to check it when I was home, but now you did it for me.
Thanks
Cor
> On Jul 5, 6:52 am, "Cor Ligthert [MVP]" <notmyfirstn...@planet.nl>
> wrote:
[quoted text clipped - 48 lines]
>
> Seth Rowe