Veronica Nerozzi Posted September 6, 2023 Share Posted September 6, 2023 Is it possibile reset to the default option a dropdown menu throught a button? Link to comment Share on other sites More sharing options...
Gaia Paolini Posted September 7, 2023 Share Posted September 7, 2023 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 More sharing options...
Veronica Nerozzi Posted September 7, 2023 Author Share Posted September 7, 2023 Thanks.Where can I put this instruction? Because in the button object there is not entry point to insert any instructions. Link to comment Share on other sites More sharing options...
Gaia Paolini Posted September 7, 2023 Share Posted September 7, 2023 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now