Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Capturing Multiple Object Sender Info into an ENUM


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 2 - Last Post: Dec 4, 2014 9:41 AM Last Post By: Remy Lebeau (Te...
tim crouse

Posts: 83
Registered: 2/11/02
Capturing Multiple Object Sender Info into an ENUM  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 4, 2014 5:33 AM
If I have many controls on a GUI is there a technique I could use to group all the object sender signatures into a single ENUM so I could use that ENUM in a case routine?

Thanks in Advance
Tim C.
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Capturing Multiple Object Sender Info into an ENUM  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 4, 2014 8:44 AM   in response to: tim crouse in response to: tim crouse
tim crouse wrote:

If I have many controls on a GUI is there a technique I could use to
group all the object sender signatures into a single ENUM so I could
use that ENUM in a case routine?

Thanks in Advance
Tim C.

Not sure what you mean with an ENUM. In Delphi, an enumeration type is
just a set of (usually continuously incrementing) symbols representing
integer constants and acting as one type. Not sure how you would
collect sender signatures in such an enum.

Example:

type
MyEnum = (meOne, meTwo, meThree);

--
Rudy Velthuis http://www.rvelthuis.de

"Experience is a hard teacher because she gives the test first,
the lesson afterwards."
--Vernon Saunders Law

Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Capturing Multiple Object Sender Info into an ENUM  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 4, 2014 9:41 AM   in response to: tim crouse in response to: tim crouse
tim wrote:

If I have many controls on a GUI is there a technique I could use to
group all the object sender signatures into a single ENUM so I could
use that ENUM in a case routine?

The simpliest solution is to use the Tag property of each control. Assign
the same value to each control that belong to the same group, and then you
can have your event handler read the Sender's Tag property and act accordingly.

--
Remy Lebeau (TeamB)
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02