This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software: Code Composer Studio
Hi,
I'm using the online GUI Composer, and I'm trying to add an onclick event for the Button widget but I can't seem to find the 'Events' section in its properties. Is there some other way to resolve this? Can I code it in JavaScript? If so, how?
Yes, this cannot be set through the widget Properties but would need to be coded in Javascript. Here are a couple of related forum threads that should hopefully point you in the right direction:
Hi,
Thank you for your help. I went to the suggested links, but they only say how to bind a DSS script to the onclick event of the button. I am using the online GUI Composer, so the button widget does not have an onclick event.
What I am trying to do is have a "save" button in my GUI, which when clicked will save data from a graph to a file. When the GUI is running, the user will write the name of the file in a text box and then click the "save" button to save the data in the file. I would greatly appreciate any help on this.
Thank You.
Hi,
Thank you very much for your help. The XDS_SaveVariablesToFile project makes use of the "onclick" event to tie a JavaScript function to the button widget, which is where the issue is. Like I mentioned before, the button widget of the online version of GUI Composer does not have an "onclick" event. So is there any other way to tie a JavaSciript function to the button widget or a way to save data to a file when a button is clicked? Any help would be greatly appreciated.
Thank You.