-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
V33 HtmlElement
Setting property textColor gives error
var main,he
class Main extends App {
onStart() {
main = ui.addLayout("main", "Linear", "VCenter,FillXY")
he = ui.addHTMLElement(main, "hr", "", 1, 0.1)
// he.innerText = "My Button"
// he.onclick = this.onTouch
// he.addEventListener("click", this.onTouch)
bt('he.backColor = "red" ')
bt('he.textColor = "yellow" ')
}
onTouch( e ) {
e.stopPropagation()
ui.showPopup( "You touched the button" )
}
}
function bt (str) {
var temp = ui.addText(main,str,"keepcase",1)
temp.setMargins(10,5,0,0,"px")
temp.backColor="cyan"
temp.setOnTouch(touched)
}
function touched() {
eval(this.text)
}
Metadata
Metadata
Assignees
Labels
No labels