I have a tab control with some dialogs as tab pages, I have a button in each of them that creates the next tab, those buttons are set as default buttons, so when I press enter key it goes to next tab. but, after you press those buttons, they become disabled, and when you go back to that tab it doesn't allow the client to click on next button again, the problem is that when I press enter when the buttons are disabled and are not default buttons any more, the tab pages get closed! It seems enter closes the dialogs! but when I change the tab and come back to that tab again, dialog is showed again!So it means enter does not destroy or close that dialog!
Dialog when the button is enabled.Pressing enter is like clicking on the button:
Same dialog after it creates the next tab:
Pressing enter when the next step button is disabled!
The Dialog after changing the tabs and comming back to that tab again!
I don't understand it's behavior! Notice that I didn't wrote anything for enter button, I just set those buttons as default button, and even when those buttons are not default buttons, it happens!what should I do?