cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Image to Table JMP extension imports single or batch images as data tables. Useful to extract curves from pictures or convert image data to curve data to use in analyses like Functional Data Explorer. Download and install the extension.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
ben_ph
Level III

Running a TextEditBox's Set Text Changed script programmatically

Is it possible to run a TextEditBox's Set Text Changed script programmatically? I can use << setText("text", runscript(1)) if the TextEditBox's script is set with <<setFunction but not when it is set with <<setTextChanged.

 

 

Names Default To Here(1);
New Window("Example",
    teb = Text Edit Box("Example Text",
        <<Set Text Changed(Function({this, value}, (this << sib) << settext(value)))
    ),
    Text Box("")
);

teb << setText("test", runscript(1)) // Works for <<setFunction

 

Thanks for any help!

 

1 ACCEPTED SOLUTION

Accepted Solutions
ben_ph
Level III

Re: Running a TextEditBox's Set Text Changed script programmatically

This seems to work

Names Default To Here(1);
New Window("Example",
    teb = Text Edit Box("Example Text",
        <<Set Text Changed(Function({this, value}, (this << sib) << settext(value)))
    ),
    Text Box("")
);

teb << setText("abc");
f = teb << getTextChanged();
f(teb, "abc")

View solution in original post

1 REPLY 1
ben_ph
Level III

Re: Running a TextEditBox's Set Text Changed script programmatically

This seems to work

Names Default To Here(1);
New Window("Example",
    teb = Text Edit Box("Example Text",
        <<Set Text Changed(Function({this, value}, (this << sib) << settext(value)))
    ),
    Text Box("")
);

teb << setText("abc");
f = teb << getTextChanged();
f(teb, "abc")

Recommended Articles