Skip to content

Unstable Embedding Prevents Use in CustomTkinter Apps (Creates Two Windows) #1

@B16f00t

Description

@B16f00t

🛑 Bug: Unstable Embedding Prevents Use in CustomTkinter Apps (Creates Two Windows)

Context

I am trying to use tkwebview to embed a WebView2 control inside a customtkinter.CTkFrame within a larger application that includes buttons and entry fields.

Problem

The library fails to reliably embed the WebView control into the provided frame's native handle (winfo_id()). Instead of integrating, it forces the WebView to open as a separate, unmanaged top-level window.

This makes tkwebview unusable for its primary purpose: creating a single-window desktop application with integrated web content (like a CustomTkinter app with buttons, entry fields, and a WebView component).

Observed Behavior

The code results in two windows:

  1. The main CustomTkinter window (with the buttons/controls).
  2. A separate, floating WebView window.

💡 Feature Request: Restore Stable Embedding

Please restore the stable embedding mechanism that was present in tkwebview2 so that the WebView control is reliably drawn within the boundaries of the parent CTkFrame.

Thank you for stabilizing the embedding functionality.

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