Skip to content

Clicking outside of a popup window #101

Answered by linkfrg
seve-andre asked this question in Q&A
Discussion options

You must be logged in to vote

Solution №1

  1. Make a window "full screen" by setting anchor to ["top", "right", "bottom", "left"]
  2. Set a Widget.Box as a child of the window
  3. Place the actual "content" of the window in it
  4. Place the Widget.Buttons in the free space, set on_click=lambda x: app.close_window("WINDOW_NAME") or something like this. Also set vexpand=True and hexpand=True.
  5. Hard to explain, but depending on the layout you want (where the content will be located), you will need to arrange these same buttons and content, and also set the required valign and halign

For example:

Widget.Window(
    anchor=["top", "right", "bottom", "left"],
    namespace="my-window",
    child=Widget.Box(
        child=[
            Widget

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@seve-andre
Comment options

@linkfrg
Comment options

@seve-andre
Comment options

Answer selected by linkfrg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants