Skip to content

Any ways to manually close the window? #25

Description

@Trumeet

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()
            }
        }
    }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions