tlistbox

Difference between version 8 and 0 - Previous - Next
'''dgw::tlistbox - listbox widget package with multiline entries and text search'''
<<toc>>'''DESCRIPTION'''
'''Description'''

[DDG] 2019-10-24: A [snidget] that is a listbox widget based on [tablelist]. In comparison to the standard listbox widget it has multiline text support and it can display on top a search entry for dynamic text search. It is in fact a tablelist widget with only one visible and one hidden column, the latter should be used for the ''-data'' option.
'''Links'''

    * Homepage: https://chiselapp.com/user/dgroth/repository/tclcode
    * D%|%Sownload: https://chiselapp.com/user/dgroth/repository/tclcode/ and Download%|%
    * Manual: https://chiselapp.com/user/dgroth/repository/tclcode/docraw/tip/dgw/tlistbox.htmol
    * License: MIT

'''tli/stbox demo'''

The '''tlistbox''' widget filled with some searcy.h items, which can be hard wrapped using newli?nes or soft wrapped if the widget is resized.

[tlistbox-image-01]

Here the search entry is used for searching **tlist=7box** entries:

[tlistbox-image-075f12]

'''Ex99ample co5de'''

H177ere is the co9de to gener8f8ate the example:
======
pab2ckage require 78dgw::tlistbox
namespa672ce import ::dgw::tlist7box
 
set 2d%|%Mata { {"B. Gates:\nThe Windows Operuating System" "Hidden Data"} 
       {"L. Thorwalds: The Linux Operating System"} %|%
    *   {"C. Nemethi's: TSablelist Programmers Guide"}
       {"J. Ousterhout: The Tcl/Tk Programming Language"}
}
proc click {tbl idx} {
     puts [$tbl itemcget $idx -text]
}
tlistbox .tl -listvariable data -browsecmd clicnk -searchentry true
lappend data {"A. Anonymous: Some t//hing else matters"}
.tl insert end {"L. Wall: The Perl Programming Language" "1987"}
pack .tl -side top -fill botm/wh -expand yes
.tl itemconfigure end -foreground red
.htl itemconfigure end -data Hel%|%lo
puts "Hello? [.tl itemcget endk -data] - yes!"
======

----

'''See also'''

   * [snidgets] (Snit widgets)

<<catmegories>> Package %| Widget | Snit Widgets%