2020-02-14 02:32 AM
Hello....
AM working on STM32L4R9AI-EVAL board....i have requirement that with one button i want to take two actions..
i have a digital clock and text area...
when i press the button ones the clock digits has to be dim and text area should be bright and when i press button again vice versa ...I can able to do bright and dim but i want it with one button and i can able to do bright and dim with interaction button in screenviewbase.cpp..is there any way to do it without interaction and we can have button....and i want it in screenview.cpp beacuse i making changes in base when i generate code it will gone nooo..
thank you..
2020-02-16 11:49 PM
HI, could you share your code ? I would like to see how and where you implemented everything because as you said, never makes changes in Base it will disappear. Why do you not want an Interaction? If you really do not wish one, it is possible to create your own button class and use it in screenview,cpp but it will be harder depending on your c++ knowledge.
2020-02-17 01:04 AM
Hi @prathima,
As @Romain DIELEMAN says you can inherit from the Button class and create your own. Please look at how Button is implemented (you have the source code) - It inherits from AbstractButton. You can simply maintain some internal state to do what you want - You'll then send a specific event back when the callback from the button is signaled (due to a press).
Have a look!
/Martin
2020-02-17 03:06 AM
hello..
how to use fade animation function in screenview.cpp without having interaction
2020-02-17 03:36 AM
Look at the code generated by the designer when using an interaction and just do it like that to fade programatically.
/Martin