- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Reset Button
I have a script that creates a window to recieve user input via text edit boxes and checkboxes. I want there to be three buttons in the window, one of which is a reset button that clear all the checkboxes and reset the text edit boxe back to their defaults (either blank, "---", or "mm/dd/yyyy"). I've gotten the checkbox part to work, but can't figure out how to reset the text edit boxes. Is this possible?
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Reset Button
Here is the example taken from the Text Edit Box() area in the Scripting Index
Help==>Scripting Index==>Text Edit Box==>Set Text
Names Default To Here( 1 );
win = New Window( "Example",
fontobj = text = Text Edit Box( "Example Text" )
);
text << Set Text( "New Text" );
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Reset Button
The Scripting Index is the definative documentation on all of the elements that can be set, modified, etc. for any of the different functions/display objects.
Here is the JSL from the example for the setting of a check box. The example is taken directlyu from:
Help=>Scripting Index==>CheckBoxBox==>Set
Names Default To Here( 1 );
New Window( "Example",
cb = Check Box( {"One", "Two", "Three"} )
);
cb << Set( 3, 1 );
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Reset Button
You're right, the scripting index is quite helpful. I was able to use it and other resources to figure out how to reset the check boxes. However, even with the scripting index, I'm stumped as how to reset the text edit boxes. Right now I put in a work around to just close and then regenerate the whole window, but I'd like to find a better way if possible.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Reset Button
Here is the example taken from the Text Edit Box() area in the Scripting Index
Help==>Scripting Index==>Text Edit Box==>Set Text
Names Default To Here( 1 );
win = New Window( "Example",
fontobj = text = Text Edit Box( "Example Text" )
);
text << Set Text( "New Text" );
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Reset Button
If Jim's example isn't working for you, share an example of your JSL. There's probably something else going on that a second set of eyes will see.
Button script to set text edit box
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Reset Button
Thanks for the help! I think somehow I missed that example when using the scripting guide.