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.

TMS320F28335: GUI Composer 2: Button property doesn't show onClick event.

Guru 20075 points

Part Number: TMS320F28335

Hello,

The button property doesn't have a place to put the onClick event method.  Also, https://dev.ti.com/gc/components/ti-widget-common/demo/ti-widget-button/index.html doesn't show the button has a onClick Event method. Is there something I am misunderstanding?

Do I have to add the event to index.gui after I download the project or am I missing something?

Stephen

  • The designer doesn't have a way for you to add event listener using the UI, this feature is on the road map. You can add event listern to the button using an existing javascript in your project or create a new javascript from the File menu in the designer.

    For example:

    i.e templateObj.$.<button_id>.addEventListener('click', () => { /* do stuff here */ });

    or

    document.querySelector('#<button_id>').addEventListener(...)