Salesforce

How Do I Specify the Text on a Parkable Push Button? (Magic xpa 4.x)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

How Do I Specify the Text on a Parkable Push Button? (Magic xpa 4.x)

When you are creating non-parkable push buttons, you specify the text on the button simply by typing it into the Format property for the push button control. However, on a parkable push button, the push button is actually attached to a variable, and the contents of the variable are what displays inside the push button.

So, for this kind of button you can specify the text:

  • By specifying an Init on the variable

  • By specifying a Default value on the variable

  • By changing the Format picture on the variable’s push button control

We will show you how to do each of these below.

Using an Init to specify push button text

  1. Create an alpha virtual, that is long enough to hold the text of the push button.

  2. Use the Init: property to specify the text. Here it is ‘View’.

  1. Drop a push button onto your form.

  2. Select your virtual in the Data property of the push button. When you view this button in the Studio, you will not see the text

  3. When you see the push button in the Studio, it will not display any text; you will just see the data picture. However, it will display properly at runtime.

Using a default value to specify push button text

This works exactly like the option using an Init. However, instead of specifying an init, you type the text into the Default value property of the variable.

This method is good in that you can use it as part of a model. However, it is not very obvious where the button is getting its value, since you can’t see it in the Data View section.

Using the picture to specify push button text

  1. Create an alpha virtual.

  2. Specify the Picture of the virtual so that it has at least one placeholder character (in this case, a “U”). Use the rest of the Picture to specify the text that should be on the button. Upper case characters need to be preceded by a backslash.

  1. Drop a push button onto your form.

  2. Zoom from the Data property to select your alpha virtual.

  3. Now you will see that the push button inherits the format from the virtual. Using this method, you can see the text of the button while you are working in the Studio.

See also

The Online and Rich Client Samples projects (program HG28 and RHG28)

Reference
Attachment 
Attachment