• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 164
  • Last Modified:

Routing events

I have a vb form with many text boxes on it.
is there an elegant way to route all their events to one function (except calling the function in each text box event handler)

Thanks in advance.
0
pertman
Asked:
pertman
1 Solution
 
Éric MoreauSenior .Net ConsultantCommented:
use a control array
0
 
gencrossCommented:
yes, control array is the way to go.
0
 
Arthur_WoodCommented:
and just to confuse the issue, in VB.NET, this is ALMOST automatic.
0
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

 
bob_onlineCommented:
You create a control array by giving all of the text boxes the same name and setting the index property.

In the events, you'll see an additional parameter "Index" which tells you which one fired the event.
0
 
DanRollinsCommented:
Hi pertman,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept emoreau's comment(s) as an answer.

pertman, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 
SpideyModCommented:
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

Tackle projects and never again get stuck behind a technical roadblock.
Join Now