Highlighted
Absent Member.
Absent Member.
188 views

[archive] Using '&' for the altkey function.

[Migrated content. Thread originally posted on 10 January 2006]

Is there a way to change the title of a button i.e. "&Cancel" to "&Return" and make "alt R" and "alt C" work respectively? We've managed by creating two same size buttons in the same location and alternating visible/enabled. That works but is a bit clumsy. It would be better to beable to just change the title on one button.
0 Likes
2 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] Using '&' for the altkey function.

In the past, we have just used a variable for the button title. Such as:

05 MY-BUTTON PUSH-BUTTON, MY-BUTTON-TITLE LINE 1 SIZE 10. . .

Then, we just substituate MY-BUTTON-TITLE when needed. As far as I can remember, the Alt-nn used from "&" worked...

Rob
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Using '&' for the altkey function.

Does this really change the accelerator (Alt) key? From what I recall, once the key is set it cannot be changed at runtime.

For example, if you displayed the screen with "&Cancel" as the label for the button, then changed the title to "E&xit", the Alt-X would not trigger the button because it was set at Alt-C.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.