bartabs, bar of tabs

The bartabs v1.6.0 is a tab bar widget with a lot of options.

Note that bartabs is contained in apave package as sort of subpackage (used as bts widget). So, having installed apave, you need not to install bartabs to use it independently.

It's all about a bar of tabs. Or a tab bar if you like it more.

The tab bars are widely used in various editors, e.g. in alited, TKE , Geany , Kate , Pluma , all very good for Tcl/Tk programming, btw.

If you need a Tcl/Tk widget similar to the tab bars of those editors, you might try bartabs .

There is a demo (11 min., 29 Mb) presenting a good example of bartabs usage.

The bartabs package provides Tcl/Tk widget containing tabs that are

  • scrollable
  • markable
  • moveable
  • closeable
  • disabled and enabled
  • static and changeable
  • selectable and multi-selectable
  • configureable
  • enhanceable with popup menu

A common appearance of bartabs is below:


Here the details are:

  • the current file is test2_pave.tcl
    • its full name is displayed by a caller of bartabs
  • currently hovered file is test_pavedialog.tcl
    • its name is displayed short, due to the -lablen 16 option
  • so, its real name is displayed by bartabs in the tooltip
  • its tab has Close button at the right
  • Scroll left and Scroll right buttons are at both edges of bartabs
  • Scroll right button is disabled, as there are no tabs beyond the right edge

A bit customized versions of bartabs may look like the following.


Here the details are:

  • a color scheme is changed
  • the hovered tab has no tooltip, as its label isn't shortened
  • Scroll right button is enabled, as two tabs were scrolled to the right


Here the details are:

  • tabs have no border due to -bd 0 option
  • bartabs got -static yes option, so the hovered tab has not Close button


Here the details are:

  • bartabs is made -static no -bd 1 again
  • currently edited file is underlined instead of blue background, due to -fgsel {} option
  • some tabs are marked with magenta foreground, meaning "modified" or similar


Here the details are:

  • bartabs got -imagemark option, so the tabs are marked with an image
  • if not marked or hovered, the tabs can show its own images


Here the details are:

  • tabs can be multi-selected with Ctrl+Click
  • thus, the caller of bartabs can handle the batch of tabs


Here the details are:

  • handlers can be called using hot keys or a popup menu bound to bartabs
  • by default, the menu actions include: 1) choosing a tab 2) moving a tab 3) closing tab(s)
  • the list of tabs contains three separated tab lists: the invisible at left, the visible, the invisible at right
  • a tab can be moved with drag-and-drop or with "... behind" menu action
  • static (-static yes) bartabs has no actions except for choosing a tab
  • even for static bartabs, its caller can provide additional menu actions and submenus

Further details:

Download link:

Demo video links: