Refreshing the body text of a dialog at runtime

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • jdrescher
    Forum Member
    • Aug 2006
    • 7

    Refreshing the body text of a dialog at runtime

    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
    Indigo Rose Staff Member
    • Feb 2001
    • 2729

    #2
    [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:

    Code:
    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:

    Code:
    strNewText = SessionVar.Expand("Text containing a session variable like %ProductName%");
    DlgStaticText.SetProperties(CTRL_STATICTEXT_BODY, {Text=strNewText});
    --[[ Indigo Rose Software Developer ]]

    Comment

    Working...
    X