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

Any ways to manually close the window? #25

Open
Trumeet opened this issue Jun 27, 2019 · 0 comments
Open

Any ways to manually close the window? #25

Trumeet opened this issue Jun 27, 2019 · 0 comments

Comments

@Trumeet
Copy link

Trumeet commented Jun 27, 2019

Hi,
I'm using this library to build a desktop project but I need to close the window manually and re-create it later. Now I'm using the ktx library but I cannot find any methods to do this. Are there any methods for me to use in order to close the window? My code is attached below. Thanks.

fun main(args: Array<String>?) {
    appMain() // Display the UI and block
    // To do some extra work.
}

fun appMain() = appWindow(
    title = "Sample",
    width = 320,
    height = 240
) {
    vbox {
        button ("Quit") {
            action {
                // uiControlDestroy
                // I tried it but the window closes without continuing the statements in main().
                this@appWindow.dispose()
            }
        }
    }
}
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