Skip to main content
Known Participant
October 13, 2020
Answered

addchild don't get ahead of text components?

  • October 13, 2020
  • 1 reply
  • 220 views

var Bt = new lib.objetos;
this.addChild(Bt);
Bt.x = 275, 5
Bt.y = 200, 5
var child = Bt
this.setChildIndex(child, this.numChildren - 1);
alert(Bt.numChildren)
alert(this.bt18.numChildren)

see the addchild behind the component how to pass it on?

    This topic has been closed for replies.
    Correct answer Joseph Labrecque

    If you are using HTML5 Canvas text components - all components make use of the DOM and not Canvas so they are drawn in an element above the Canvas rendering. So any textinputs will always be above any Canvas content. 

    1 reply

    Joseph Labrecque
    Community Expert
    Joseph LabrecqueCommunity ExpertCorrect answer
    Community Expert
    October 13, 2020

    If you are using HTML5 Canvas text components - all components make use of the DOM and not Canvas so they are drawn in an element above the Canvas rendering. So any textinputs will always be above any Canvas content.