PDA

View Full Version : Refreshing the body text of a dialog at runtime


jdrescher
04-04-2007, 08:27 AM
Hello!!

I have the following problem:
I have a dialog with a body text. In this body text is a session variable. While the dialog is displayed, the session variable changes. When the user clicks on a button, on that dialog, I would like to refresh the body text so that the new value of the session variable is displayed.
I tried to reopen the dialog with Screen.Jump("..."), but this didn't worked. The value of the session variable displayed in the body text is always as it was when the dialog opened the first time.

I hope you understand my question...

Jens Drescher

Lorne
04-10-2007, 09:15 AM
[By dialog you mean one of the wizard screens (Project > Screens) and not a pop-up dialog, right?]

You can set the body text directly on a screen using something like this:

DlgStaticText.SetProperties(CTRL_STATICTEXT_BODY, {Text="new text"});

If you want to include a session variable in the text, you can expand it from script like this:

strNewText = SessionVar.Expand("Text containing a session variable like %ProductName%");
DlgStaticText.SetProperties(CTRL_STATICTEXT_BODY, {Text=strNewText});