Wizard's formacceptbutton property not working

Wizard for Windows Forms Forum

Posted 12 years ago by Andy Oppong-bawuah
Version: 3.0.0131
Avatar
I have been trying for half of today to get the my wizard's formacceptbutton to work. Even with that property set, I can't get the return key to fire off the next buttons click event and move to the next page. Please help

Comments (9)

Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Andy,

Setting the Wizard.FormAcceptButton property will simply change your Form's AcceptButton property. Perhaps you are overriding that property manually. You can check the root Form's AcceptButton to see what it is set to and if it is not one of the Wizard's buttons, then something in your code is overriding it.


Actipro Software Support

Posted 12 years ago by Andy Oppong-bawuah
Avatar
When i check the value of the propery, I get what I set it to in design time that is FinishThenNext. What can be overriding this? Also the I can't get tabing throuh the windows controls I put on the wizard to work .
Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
No, I'm saying check the Form.AcceptButton property, not the Wizard.FormAcceptButton property. The Form.AcceptButton (on your Form or WizardDialogForm if you are using that) is what Windows uses to determine the default button. Wizard.FormAcceptButton simply sets that property. But Form.AcceptButton is what you need to examine here.

Tabbing should work fine if you have tabstops set and tab indices in the right order.


Actipro Software Support

Posted 12 years ago by Andy Oppong-bawuah
Avatar
when I check the form.acceptbutton property, I get "y, Text:next>". i don't know what this means though.
Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
That sounds correct, since "y" is an obfuscated class of our wizard buttons I believe. And it is saying the text of the button is "next" meaning the next button.

The .NET framework controls the "default" button behavior once Form.AcceptButton is set, not us. So as long as you have it set to the correct button (which it appears that you do) and you are not intercepting ENTER keys by the control that has focus (such as other buttons or links or multiline textboxes, etc.) it should work ok. I just tested our demo and it's working fine there.


Actipro Software Support

Posted 12 years ago by Andy Oppong-bawuah
Avatar
How do i find out if the next buuton(it has focus) is intercepting the ENTER keys.
Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
If Windows is passing the ENTER keypress to the Next button then the Wizard.NextButtonClick event will fire.


Actipro Software Support

Posted 12 years ago by Andy Oppong-bawuah
Avatar
What do you mean by that? i didn't quite understand your last comment
Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
I'm sorry but I apparently don't understand your question.

Again, all our property does is set the Form's AcceptButton property to the Next or Finish buttons, based on the setting you supply. After that, it's Windows Forms that controls the ENTER processing behavior. If you are focused on a control that processes the ENTER key, such as another Button or multi-line TextBox, the "accept" button will not fire. If you are on a control like a regular TextBox and press ENTER, the "accept" button should file. Our code doesn't intercept the ENTER keypress, this is handled by the system. You should also see a different system-based border highlight on the active "accept" button.


Actipro Software Support

The latest build of this product (v2018.1 build 0341) was released 3 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.