Jump to content

Is it possibile reset to the default option a dropdown menu throught a button?


Veronica Nerozzi

Recommended Posts

I cannot find an element in the API to reset a text area or a dropdown menu. But a dropdown menu populates a property, usually a document property, so if you know the default you can simply have a script that does this:

Document.Properties['mydropdownProperty']='my default value'

where you insert appropriate values for the property name (mydropdownProperty) and the default (my default value).

Link to comment
Share on other sites

This would go into an IronPython script that you attach to that button.

So you add a button to a text area (edit text area then add an Action Control) and from that menu you select Script on the left, then New..., then in the script editor copy that instruction. Save with a script name and a button name.

For an introduction to scripting with IronPython, there are some resources here:

https://community.spotfire.com/s/article/IronPython-Scripting-in-TIBCO-Spotfire

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...