Skip to content

Hybrid HtmlElement #134

@Al4He6

Description

@Al4He6

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions