Version 1 of dgw::tvmixins

Updated 2020-04-10 08:15:57 by DDG

NAME

dgw::tvmixins - functionality extensions for the *ttk::treeview* widget such as sorting, tooltips, banding stripes, key based navigation.

DESCRIPTION

dgw::tvmixins - The package dgw::tvmixins implements several snit::widgetadaptors which extend the standard *ttk::treeview* widget with different functionalities. Different adaptors can be chained together to add the required functionalities. Please note that most of teh functionalities are not coded mainly by the author of the package DDG but just wrappers of the functionalities into snit::widgetadaptors for easy usage and combining the different properties and functionalities.

The following adaptors are currently available:

  • dgw::tvband - providing banding stripes (will be obsolete with Tcl/Tk 8.7)
  • dgw::tvfilebrowser - providing a interactive file browser widget with standard icons
  • dgw::tvksearch - key based navigation using Home and End keys as well as by typing starting letters
  • dgw::tksortable - adds easily sorting facilities to the treeview widget as well a <<SortEnd>> event
  • dgw::tooltip - adds row tooltips by providing <<RowEnter>> and <<RowLeave>> events

LINKS

EXAMPLE

# wrapper function 
proc fbrowse {path args} {
     set fb [dgw::tvtooltip [dgw::tvksearch [dgw::tvfilebrowser [dgw::tvband [ttk::treeview $path]] {*}$args]]]
     return $fb
}

set fb [fbrowse .fp2]
pack $fb -side top -fill both -expand yes
pack [::ttk::label .msg -font "Times 12 bold" -textvariable ::msg -width 20 \
     -background salmon -borderwidth 2 -relief ridge] \
     -side top -fill x -expand false -ipadx 5 -ipady 4
bind $fb <<RowEnter>> { set ::msg "  Entering row %d"}
bind $fb <<RowLeave>> { set ::msg "  Leaving row %d"}

See the follwing image for an example run:

treeview-mixin-image-04

CHANGES

  • 2020-04-10: 0.2 first official release

SEE ALSO

  • ttk::treeview mixins - intial starting version of this package
  • dgw::basegui - application framework which as well delivers a set of small functionalities embeddable into existing or new Tk applications.

DISCUSSION

Please discuss here.