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

create an adhocInternalWindow #230

Closed
ronsmits opened this issue Jan 14, 2017 · 2 comments
Closed

create an adhocInternalWindow #230

ronsmits opened this issue Jan 14, 2017 · 2 comments

Comments

@ronsmits
Copy link
Contributor

the adhocFragment and adhocWindow are good is it possible to have an adhocInternalWindow function too?

@edvin
Copy link
Owner

edvin commented Jan 14, 2017

It could be as simple as:

protected fun openInternalAdhocWindow(title: String, scope: Scope = this@UIComponent.scope, icon: Node? = null, modal: Boolean = true, owner: Node = root, escapeClosesWindow: Boolean = true, closeButton: Boolean = true, rootBuilder: UIComponent.() -> Parent) =
    InternalWindow(icon, modal, escapeClosesWindow, closeButton).open(AdhocFragment(scope, title, rootBuilder), owner)

Basic usage:

openInternalAdhocWindow("Internal title") {
    label("Look ma, I'm internal!")
}

Will that work for you?

@edvin
Copy link
Owner

edvin commented Jan 17, 2017

Sorry Ron, I seem to have committed this one already. It's called openInternalBuilderWindow

@edvin edvin closed this as completed Jan 17, 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

2 participants