Alt Key Accelerator Not Working
Posted: Wed Apr 17, 2024 12:53 pm
Hello,
My requirement is for all buttons to have an Alt key accelerator. To be clear, this is when the caption of the button shows an underlined character. Pressing Alt + <the underlined character> will activate the button the same as a left mouse click would. Do do this, just add an ampersand "&" immediately before the character you want to underline in the Caption property of the control. I have this work everywhere except one button.
I have a custom dialog with the standard Back, Next, and Cancel buttons with captions of "< &Back", "&Next >" and "&Cancel". The Next and Cancel buttons are working fine with the accelerators. However, the Back button won't trigger with Alt-B. I can see the problem both when testing the dialog and when running the full compiled installer. If I use the mouse to click the button, then it works fine. Additionally, on every other dialog that has the same 3 buttons the Back button works just fine. I've included screen shots of the Back and Next button properties.
So what is wrong with this one Back button, and how do I fix it?
Thanks in advance,
Bond
My requirement is for all buttons to have an Alt key accelerator. To be clear, this is when the caption of the button shows an underlined character. Pressing Alt + <the underlined character> will activate the button the same as a left mouse click would. Do do this, just add an ampersand "&" immediately before the character you want to underline in the Caption property of the control. I have this work everywhere except one button.
I have a custom dialog with the standard Back, Next, and Cancel buttons with captions of "< &Back", "&Next >" and "&Cancel". The Next and Cancel buttons are working fine with the accelerators. However, the Back button won't trigger with Alt-B. I can see the problem both when testing the dialog and when running the full compiled installer. If I use the mouse to click the button, then it works fine. Additionally, on every other dialog that has the same 3 buttons the Back button works just fine. I've included screen shots of the Back and Next button properties.
So what is wrong with this one Back button, and how do I fix it?
Thanks in advance,
Bond