tkribbon

tkribbon is a set of C extensions for Tk on Windows: an Office-style ribbon, docking panes and more than 60 custom-drawn widgets, plus a Scintilla code editor, graphs based on BLT and an HTML/CSS viewer based on litehtml. All commands live in the rtk:: namespace.

  • Demo programs: download (two Windows executables, nothing to install)
  • Screenshots and feedback: github.com/hanulso78/tkribbon-demo
  • License: commercial (planned); free time-limited demo programs available now
  • Platform: Windows 10 and 11, 64-bit; Tcl/Tk 8.5 or 8.6 (loads through stubs)

https://raw.githubusercontent.com/hanulso78/tkribbon-demo/main/screenshots/demo-start.png

Why a demo first

tkribbon is planned as a commercial product. Before deciding on licensing and pricing, I am releasing demo programs to see whether the library is useful to Tcl/Tk developers and what they would need from it. That is why the programs are time-limited and the source is not public yet. Feedback is very welcome: which widgets you would use, what is missing, which platforms or Tcl/Tk versions matter to you, and what kind of license would work for you (per developer, per project, source included, and so on). Please add it below or in the issues of the demo repository .

Try it

The release page has two executables built with a tclkit:

  • tkribbon-demo.exe - one window with a ribbon, docking panes, a code editor, widgets in dark and light themes, a data grid with 20,000 rows, charts, a setup wizard, and every example in tabs
  • tkribbon-examples.exe - a launcher for 106 small examples, one per widget or topic; double-click one to run it in its own window

They need no Tcl/Tk installation. The libraries inside are time-limited builds that work for 15 days from the first start. The executables are not signed, so Windows SmartScreen may ask before starting them ("More info", then "Run anyway").

Packages

  • tkribbon - ribbon (tabs, groups, galleries, quick access toolbar, key tips, contextual tabs, backstage), drawn title bar and frameless windows, docking panes (tabify, split, float, auto-hide), dockable toolbars, menu bar and drawn menus, themes with per-monitor DPI scaling, and widgets: buttons, line and masked edits, auto-completion, date and time edits, sliders, dials, ratings, color and font pickers, tree list, data grid, property grid, pivot table, spreadsheet, calendar scheduler, Gantt timeline, Kanban board, node editor, diagram (flowchart) editor, photo editor, hex editor, rich text editor, Markdown viewer, terminal (ConPTY), chat view, map view, QR codes and bar codes, web view (WebView2), task, input and progress dialogs, notification area (system tray) icons, drag and drop, JSON and XML read/write, saving and restoring the window arrangement
  • tkscintilla - Scintilla code editor with ruler, minimap, find bar, diff view, code outline and autocomplete
  • tkgraph - graphs and charts based on BLT: lines, bars, pie, heatmap, polar, 3D surfaces, figures with several plots, export
  • tkhtmlview - HTML/CSS viewer based on litehtml: flex, grid, CSS variables, gradients, history, find, zoom, forms

Example

package require tkribbon

::rtk::theme darkgray
rtk::ribbon .r
.r tab add home -text Home
.r group add home g -text Greeting
.r item add g hello -text "Say hello" -command {puts "Hello, world!"}
pack .r -fill x

Screenshots

Code editor (tkscintilla) with the ruler, minimap and margin tips:

https://raw.githubusercontent.com/hanulso78/tkribbon-demo/main/screenshots/demo-editor.png

Dashboard example: navigation view, tile dashboard, seven-segment clock, LEDs, ratings:

https://raw.githubusercontent.com/hanulso78/tkribbon-demo/main/screenshots/demo-dashboard.png

Graphs (tkgraph):

https://raw.githubusercontent.com/hanulso78/tkribbon-demo/main/screenshots/demo-graph.png

Widgets in the light theme:

https://raw.githubusercontent.com/hanulso78/tkribbon-demo/main/screenshots/demo-widgets-light.png

Discussion