0

I am working in Windows Forms. I have a Form which has two panels. Both panels have OK and Cancel buttons. I want them to behave as Accept and Cancel button (Similar to Form's AcceptButton and CancelButton), for their respective panel(container).

So basically I want AcceptButton and CancelButton sort of functionality for the Panel. How should I implement this?

Brij
  • 11,731
  • 22
  • 78
  • 116
  • 1
    AcceptButton and CancelButton are used for returning a DialogResult from a ShowDialog Method. A panel is just a Control how/what are you wanting these buttons to do on your panel. – Mark Hall Dec 16 '12 at 07:03
  • I want these buttons to act as Accept and Cancel button but inside a Panel. I have several of these panels inside a single Form. – Brij Dec 16 '12 at 07:46
  • 2
    "act as Accept and Cancel" - what do you exactly need, do you want to close the form with all buttons, or do you want to set the dialog result, or do you want to have these buttons pressed if the user presses "return" or "esc"? – user287107 Dec 16 '12 at 10:23
  • I want to carry out some specific functionality on click of a button inside a panel. Nothing like closing form or setting dialog result. – Brij Dec 17 '12 at 06:16

0 Answers0