It seems stuped question but i have to know the answer.
-
lets say I have 5 buttons and 1 text box I want to get the text from all the button so if I click one of the button the text of the same button will be written in the textbox but! I can use 5 event's I only need to use on event. please someone help me
-
lets say I have 5 buttons and 1 text box I want to get the text from all the button so if I click one of the button the text of the same button will be written in the textbox but! I can use 5 event's I only need to use on event. please someone help me
Register the same event handler to all buttons, cast the sender parameter of the event handler from object to Button and finally access the button's text.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook