Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cant add components without using Screen #26

Closed
ianharrigan opened this issue Oct 5, 2017 · 0 comments
Closed

Cant add components without using Screen #26

ianharrigan opened this issue Oct 5, 2017 · 0 comments

Comments

@ianharrigan
Copy link
Member

When trying to add components by using the .element property and appending them to an existing <div/> the components are never considered "ready" and therefore never resize, or show correctly.

Expected Behavior

Should be able to add a UI anywhere in the DOM tree and it all work as expected.

Test app / minimal test case

class Main {
	static public function main() {
		haxe.ui.Toolkit.init();

		var main = new VBox();

		var button1 = new Button();
		button1.text = "Button 1";
		main.addComponent(button1);

		var button2 = new Button();
		button2.text = "Button 2";
		main.addComponent(button2);

		js.Browser.document.getElementById("content").appendChild(main.element);
	}
}
@ianharrigan ianharrigan changed the title Cant add components with using Screen Cant add components without using Screen Oct 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant