How Do I Dynamically Set the Caption for a Window? (Magic xpa 4.x)
By default, the Form name property is inherited from the name of the Task. You can easily change it by typing over the text in Form Properties->Form name. However, you can also set the name dynamically, so it can change even while the task is running.
-
Go to the Forms tab of your task.
-
Type Alt+Enter to bring up the Form Properties.
-
Go to the Form Name property.
-
Zoom from the Expression column, to enter an expression that will evaluate to an alpha string.
In the Studio, the Form name will still appear as the text in the Form name property. However at runtime, the Expression will be evaluated and the results will be displayed in the title bar.
The Online and Rich Client Samples projects (program WI02 and RWI02)