Style a Button from another button

vinians

Member
Licensed User
Longtime User
Im sorry but it´s me again.
I want to create a series of Button objects with gradient background. Using the designer it´s easy, but when creating at runtime it´s not so easy. So, I´ve created a dummy button and I setted up "visible" property to false in the design, then I used this code to copy the style:
B4X:
mybutton.background = btnDummy.background
The style was copied but when I click in that buttons at run time only the last one seems to receive the click or better, only the last one show the click. What is wrong with this approach or how can I create a complete gradient style at run time?
Thanks in advace!
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…