Alt Key Accelerator Not Working

Got a problem you cannot solve? Try here.
mbond
Posts: 15
Joined: Thu Dec 12, 2013 9:37 am

Alt Key Accelerator Not Working

Postby mbond » 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
Attachments
Custom Dialog with Next Button Properties.png
Custom Dialog with Next Button Properties.png (87.11 KiB) Viewed 2993 times
Custom Dialog with Back Button Properties.png
Custom Dialog with Back Button Properties.png (87.36 KiB) Viewed 2993 times

JohnGaver
Posts: 115
Joined: Mon Feb 05, 2024 6:15 pm

Re: Alt Key Accelerator Not Working

Postby JohnGaver » Fri Apr 19, 2024 11:50 am

This topic applies to InstallAware Multi Platform as well.

An accelerator cannot be shared by more than one component.

If an accelerator is used in the caption field of a label, that label will select the control referred to in its FocusControl property.

Your:

Code: Select all

Data&base Name


label appears to be one such control.
John Gaver
InstallAware Skunkworks
InstallAware Multi Platform - Liberating DEB/RPM/PKG/MSI(X) into universal native setups!
Get your free copy today - https://www.installaware.com/installaware-multi-platform.htm


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 31 guests