Custom component

Hi,

It’s been a while since I last checked Haxe UI and I’m really liking the new updates.

Was looking at the examples and the custom component one caught my eye. Is this possible with the OpenFL backend?

I’ve tried replicating it with the code snippets provided but I keep getting an error on this.element.append(_iframe); since Box or any Component doesn’t have an element field.

No, unfortunately not. The openfl backend doesnt contain an “element” var because in haxeui-openfl, the components are openfl sprites (and not html elements), so this example only applies to haxeui-html5.

That said, it would be feasible (on openfl) to create the iframe, add to the body and move it as the custom component moves. It wouldnt be really “in the ui” more “floating over openfl”, so there would certainly be some gotchas there, but it might suffice. its about the best you are going to get since the display list in openfl it nothing do with the browser at all.

Cheers,
Ian

Figured that would be the case.
Thanks for the reply.