You could build the title using Eval Insert or string concatenation.
Here is one option
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
nw = New Window("simulator",
H List Box(Text Box(" Input sample rate "), sample rate = Number Edit Box()),
H List Box(Text Box(" Input threshold "), threshold = Number Edit Box()),
Button Box("OK",
thesamplerate = sample rate << get;
thethreshold = threshold << get;
//numthreshold = Num(thethreshold);
//numtime = Num(thetime);
gb = dt << Graph Builder(
Variables(X(:age), Y(:weight)),
Elements(Bar(X, Y, Legend(4)))
);
Report(gb)[TextEditBox(1)] << Set Text(Eval Insert("Sample rate = ^thesamplerate^ Threshold = ^thethreshold^"));
)
);
You should be able to also insert it directly to the title in SendToReport. Here I also build title variable separately but it isn't necessary but can make debugging and such easier
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
nw = New Window("simulator",
H List Box(Text Box(" Input sample rate "), sample rate = Number Edit Box()),
H List Box(Text Box(" Input threshold "), threshold = Number Edit Box()),
Button Box("OK",
thesamplerate = sample rate << get;
thethreshold = threshold << get;
//numthreshold = Num(thethreshold);
//numtime = Num(thetime);
graph_title = Eval Insert("Sample rate = ^thesamplerate^ Threshold = ^thethreshold^");
gb = dt << Graph Builder(
Variables(X(:age), Y(:weight)),
Elements(Bar(X, Y, Legend(4))),
SendToReport(
Dispatch(
{},
"graph title",
TextEditBox,
{Set Text(graph_title)} //I want to have sample rate & threshold shown on title
)
)
);
)
);
-Jarmo