B4J Question Web App with BANano and Konva.js

Diego2494

New Member
Hello, i am new in this forum, and i am doing a web app with BANano library and Konva.js, i made some layers with konva.
I want to create some buttons that fulfill certain functions, but that remain in these layers, but when creating them they are outside these layers, they remain in the body, I really don't know how to create them, thank you very much for your help.


Box As BANanoObject
Box.Initialize2("Konva.Rect",Array(CreateMap("x": 0,"y":0,"width": myWidth,"height": myHeight, "fill": "black","stroke": "yellow","strokeWidth": 4))) this is the layer.
layer.RunMethod("add",Array(Box))

Dim buttonIn As BANanoElement = Container.Append($"<button id="buttonIn">Iniciar</button>"$).Get("#buttonIn")
buttonIn.HandleEvents("click", Me, "buttonIn_click") this is the button to create on the layer.

How can I create this button and assign functions? I would like to be able to apply css too, this is my first project in B4J, I want to learn more about design, functions with js and css, thank you very much for your help and attention.

P.D: Sorry for my bad english.
 

Mashiane

Expert
Licensed User
Longtime User
Hey @Diego2494 , it would be better to upload example source for your issue. This looks like something I once did on the BANanoPhaser project I was working on here. I'm sure I can help, you can pm me your code if you want or load it here as a zip file. That you can do by clicking 'attach files' at the bottom of your thread post.

Please next time when you paste code, enclose it in
B4X:
...
by using the toolbar like this. A prompt will be available for you to paste the code.

CodeX.png



Ta!
 
Last edited:
Upvote 0
Top