Results 1 to 2 of 2

Thread: Panel Controls

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2001
    Location
    USA
    Posts
    1,026

    Panel Controls

    How can I find out which control I clicked on in a panel?

    Let's say I have 10 indistinguishable buttons on a form, how can I know which one I clicked without having to go into that buttons click event handler (it might not be available)

    Thanks,

    Squirrelly1
    Now happily married and still crankin' away at the keyboard. Life is grand for a coder, no?

  2. #2
    Frenzied Member
    Join Date
    Oct 2002
    Location
    Gammapolis
    Posts
    1,474

    Re: Panel Controls

    What you say doesn't make sense. How can you understand which one is clicked if you dont catch it in the click event?!
    What i recommend is loop through the controls you want to test for click and add a delegate that handles all of their click events. Then in that event check for the sender name.
    'Heading for the automatic overload'
    Marillion, Brave, The Great Escape, 1994

    'How will WE stand the FIRE TOMORROW?'
    Eloy, Silent Cries and Mighty Echoes, The Vision - Burning, 1979

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width