Skip to content
| Marketplace
Sign in
Visual Studio Code>Visualization>TK-FormNew to Visual Studio Code? Get it now.
TK-Form

TK-Form

ByeongCheol Kim

|
4 installs
| (1) | Free
Visual Tkinter GUI designer for VS Code with drag-and-drop editing, real Tkinter preview, validation, AI Skill guidance, and Python export.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

TK-Form for VS Code

Design Python Tkinter interfaces visually, preview the real window, validate the project, and export clean Python code without leaving VS Code.

Fuel my next token Sponsor on GitHub

TK-Form brings a WinForms-style workflow to Tkinter. Place widgets on a canvas, edit their properties and events, check the generated project, launch a real Tkinter Preview, and Export Python from the same editor.

Personal use is free. Commercial/enterprise use requires a paid license. Donation is optional and does not change license rights. TK-Form is source-available, not OSI open source.

Design Tkinter UIs Visually

Build forms with a visual canvas while keeping the project in a readable .tkform.json format.

  • Drag, resize, align, snap, and zoom common Tkinter and ttk widgets.
  • Edit layout, text, colors, widget options, and events in the property inspector.
  • Navigate complex forms through the widget tree.
  • Manage menus, Tk variables, image resources, and non-visual components.
  • Work with Button, Label, Entry, Text, Frame, Notebook, Treeview, and other commonly used widgets.
  • Start from included Login, Settings Panel, and Data Browser examples.

TK-Form running inside VS Code with the toolbox, canvas, widget tree, and inspector visible

TK-Form is useful for individuals learning Tkinter, Internal tool teams building focused desktop utilities, and Tkinter maintenance teams modernizing existing tools. Commercial or organizational use requires a Commercial License.

Quick Start

  1. Open a local folder and trust the workspace. Python-backed actions remain disabled in an untrusted workspace.
  2. Open the Command Palette and run TK-Form: Open Example Project.
  3. Choose Login, save the generated .tkform.json file, and let the custom editor open it.
  4. Open the toolbar Python panel. Enter an absolute Python executable path or leave it blank to use the configured/default runtime, then select Check Python or Check.
  5. Select Validate to check the project and generated code.
  6. Select Preview to open the real Tkinter window.
  7. Select Export and save the generated .py file.

To create a project from scratch, run TK-Form: New Project. Opening any existing .tkform.json file launches the visual editor automatically.

From Design to Python

The normal workflow stays inside one VS Code editor:

  1. Design — place widgets and edit properties or event code.
  2. Validate — catch schema, layout, option, and code-generation problems.
  3. Preview — run the generated interface with a local Python runtime and real Tkinter.
  4. Export — write a Python starting point in the structure that fits your project.

TK-Form workflow from visual design through validation and preview to Python export

Validation runs before code generation so export problems are reported in the designer output dock. The toolbar also provides Stop preview when a Preview process is running.

Export Modes

  • Function export creates a straightforward single-file script. Named widgets are available through root._tkform_widgets for follow-up code.
  • Class export creates an App(tk.Tk) class and exposes named widgets as self.<widget_name> attributes.
  • Split-file export regenerates ui_<project>.py while keeping the user entry point separate. It creates app.py only when it does not already exist.

TK-Form Class export mode and generated App class shown in VS Code

Generated Python is an editable starting point. Manual edits inside regenerated UI files are not preserved across repeated exports. With Split-file export, keep custom application logic in app.py instead of ui_<project>.py.

AI-Assisted Design

Optionally pair TK-Form with Codex, Copilot, Cursor, or another AI coding agent by registering the TK-Form AI Skill:

https://github.com/atk-bckim/bckim-skills/tree/main/TKform-skill

Copy this prompt into your AI tool:

Register this skill: https://github.com/atk-bckim/bckim-skills/tree/main/TKform-skill

A useful AI-assisted workflow is:

  1. Open or select a .tkform.json file.
  2. Attach a screenshot, sketch, or reference image when your AI tool supports images.
  3. Ask for a form, dialog, layout, or focused widget changes.
  4. Review the result in TK-Form, then Validate and Preview it.

Commands

Open the Command Palette to run:

  • TK-Form: New Project — create a new design file.
  • TK-Form: Open Project — open an existing .tkform.json design.
  • TK-Form: Open Example Project — create a writable copy of an included example.
  • TK-Form: Validate Project — validate the active design.
  • TK-Form: Preview Project — launch the active design with real Tkinter.
  • TK-Form: Stop Preview — stop the running Preview process.
  • TK-Form: Export Python — export the active design.
  • TK-Form: Open Output — show validation, Preview, and Export messages.
  • TK-Form: Check Python Runtime — open the Python panel and check the runtime.
  • TK-Form: Copy Support Summary — copy a sanitized diagnostic summary without project source or event code.

Python Preview Settings

In most cases, select a runtime from the designer toolbar's Python panel. These VS Code settings are also available:

  • tkform.pythonPath — absolute Python path used for Preview.
  • tkform.enginePythonPath — optional Python path used by validation and code generation.
  • tkform.previewInheritPythonPath — prepend the project folder and inherit the existing PYTHONPATH; disabled by default.

Preview runtime precedence:

  1. Runtime saved in the designer Python panel.
  2. tkform.pythonPath.
  3. TKFORM_PREVIEW_PYTHON.
  4. The backend engine runtime.

Validation and code-generation runtime precedence:

  1. TKFORM_ENGINE_PYTHON.
  2. tkform.enginePythonPath.
  3. python3 on macOS/Linux or python on Windows.

If Preview cannot open a window, confirm that the selected runtime includes Tkinter:

python3 -c "import tkinter; print(tkinter.TkVersion)"

Requirements and Workspace Trust

  • VS Code 1.94 or later.
  • A local Python runtime with Tkinter for Preview.
  • A local workspace folder trusted by VS Code for Python-backed actions.

Opening, editing, and saving .tkform.json files works in an untrusted workspace. Validation, code generation, Export, Python runtime inspection, and Preview execute local Python, so TK-Form disables those actions until the workspace is trusted.

Only run Python-backed actions in projects you trust. TK-Form does not collect telemetry; see SECURITY.md and PRIVACY.md for details.

Current Limitations

  • The canvas approximates Tk layout behavior; use Validate and Preview before relying on final sizing.
  • Manual edits inside regenerated UI files are not preserved across repeated exports.
  • Split-file export protects an existing app.py, but the generated ui_<project>.py file is replaced on subsequent exports.
  • TK-Form currently focuses on practical single-window forms and commonly used Tkinter/ttk widgets rather than full two-way synchronization with handwritten Python.
  • License automation, in-app account management, and broad enterprise self-service are not included in this release.

See KNOWN_LIMITATIONS.md for the detailed technical boundaries.

License and Support

TK-Form is source-available under the TK-Form Personal Free and Commercial License.

  • Personal use is free under LICENSE.
  • Commercial/enterprise use requires a paid license; see COMMERCIAL-LICENSE.md.
  • Commercial licenses start from USD 49 per seat per year. Contact bckim7639@gmail.com for quotes, invoices, evaluation terms, and enterprise support terms.
  • Donation is optional and does not replace a Commercial License.
  • Code received at or before commit 34053e3237455565b6943769f9b74f2778bfec3b retains the legacy MIT terms documented in LICENSE-MIT-LEGACY.md.
  • Third-party dependency notices are listed in ThirdPartyNotices.txt.

For troubleshooting and issue-reporting guidance, see SUPPORT.md. Release changes are listed in CHANGELOG.md.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft