Hey!
Is it possible to change the colour of an item like a box, button or background of a strip to a colour code that's stored in the database?
So an item named colourBox has a value of #FFFFFF. So on that particular dynamic page, the box needs to be displayed white. But on another dynamic page, the value is #000000 so it needs to be displayed in black. Is this possible?
Thanks in advance!
Hi Quin,
You can change any element that has the style API like buttons, you can change their properties like this:
$w('#button').style.foregroundColor = "#FFFFFF"; $w('#button').style.backgroundColor = "#FFFFFF"; $w('#button').style.color = "#00000";
If the element doesn't have the style API, you still probably can change them by using the .html. like any html element elsewhere.
thank you
hey, I have another issue. I need to place a button and navigation on the left side of my page, however as i noticed that is not possible as element should be in middle grid area. is there a way to work around it? thanks
Thank you very much
Hello everyone, is it possible to change just one tittle colour from the menu? currently it is possible change only all elements but could I change just one using code? I'll leave a screenshot to make it clear. thanks
Hello everyone, is it possible to change just one tittle colour from the menu? currently it is possible change only all elements but could I change just one using code? I'll leave a screenshot to make it clear. thanks
Hi Quin, how did you solve this? Same boat here.
Hey, thanks for your response.
Actually this is not what I meant. I'll give you an example of what I am trying to accomplish.
So, in a database, there's an item named ColorBox1. In row one, the value of this item is by example #ff0000 (red). On the dynamic page of row one, I want the box to appear red. And on row two the value is #00ff00 (green). So on the dynamic page of the second row, I want the same box to appear green.
I hope this is a clear explanation.