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.

CCS/CCSTUDIO-C2000: Gui Composer V2 button question

Part Number: CCSTUDIO-C2000


Tool/software: Code Composer Studio

Hello,

I am using Code Composer Studio v7.1 and gui composer v2

For my application, i am using windows based touch screen computer and running gui composer on it. In gui composer, i need a button which is value become 1 when i press on it on a touch screen, and i need it is value become 0 when i do not touch on it.

It should not be like clicking on the button, because when i click on the button, it's value become 1, but if i want to make it's value 0, i need to click on the button again. What i want is, when i click on the button it's value become 1, and when i leave my finger over the button, it's value become 0 again.

Is this possible with existing gui composer v2 buttons? 

Thank you

  • Hi permantier,

    Not sure exactly what you are trying to do...

    If you wish to send 1 to the target when a button is pressed and send 0 to the target when the button is released, you can bind to the ti-widget-button's pressed value

    If, whenever a button is pressed, you wish to send a 1 to the target for e.g. 100ms and then send a 0 to the target, you can write an eventListener handler for the button in Javascript.

    I can provide more info on either of these approaches - which would be of more interest to you?

    Regards,
    Brian

  • Hello BrianC,

    I am trying to send 1 to the target when a button is pressed and send 0 to the target when the button is released, 

    As you suggested, i was able to bind to the ti_widget_floating_action_button, and my problem is solved.

    Thank you.