Skip to main content

[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.

[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.
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

[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.
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.

[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.
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.