Change color of objects in Lectora
June 24, 2015 12:00 AM
Hi,
i'm trying to figure out if there a way to change the color of an object by using some kind of action.
For example rectangle is grayish but when the user clicks depending on what was the content of that rectangle it becomes different color.
Any ideas simpler then having a double rectangle?
Thanks
Discussion (3)
Use External HTML Object (HTML Extension), set it to Custom DIV, write any code inside. E.g.
undefinedmydiv1undefined width:333px;height:222pxundefined
Then you will be able to programmatically change its background with JS:
document.getElementById(';mydiv1';).style.backgroundColor = undefined
I just use two different objects, and use the Change Contents feature...or Show/Hide if the items aren't the same size. You can use the "On Mouse Click" action to trigger these events. :)
Discussions have been disabled for this post