Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Specifying the caption for a Button control

Updated on November 15, 2021
Applicable to Theme UI-Kit applications

Using a caption for a Button control makes it easier for application users to understand the button's purpose and to complete their tasks.

If you plan to localize the application that includes this Button control, limit the caption's text length to 64 characters. A field value rule with pyButtonLabel as the second key part and this text as the final key part is needed for each locale. When practical, choose a caption that is already included in a language pack, to simplify later localization.

  1. On the General tab of the Properties panel, set the Button caption option to one of the following settings:
    • Text – Select this setting and in the adjacent field enter the text to display as the button's caption.
    • Property Reference – Select this setting and use the adjacent field to configure the button caption as a property reference.
  2. To make it possible for users to execute a button's activity by using shortcut keys, include an ampersand (&) immediately before a letter in the caption text to designate that letter as the shortcut key.
    For example, enter &History as the caption text to allow application users to press ALT + h to access work item history.
  3. If your application includes non-autogenerated sections that reference buttons using the ampersand shortcut technique, you must revise the section to include the following JavaScript line:

    pega.u.d. processAccessKeysOnClient = true

    If the sections are part of a harness, you can reference a JavaScript function containing the above line on the Scripts & styles tab of the Harness form.

  • Previous topic Adding a Button control to a harness
  • Next topic Specifying the image source and tooltip for a Button control

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us