#!/usr/bin/tclsh

package require Tk
set ::completions {alpha bravo charlie delta echo foxtrot golf hotel india
    juliet kilo lima mike november oscar papa quebec romeo sierra tango uniform
    victor whisky xray yankee zulu}

proc main {} {
    #wm overrideredirect . 1
    listbox .lb -listvariable ::completions -width 0 -highlightthickness 0
    if {[llength $::completions] > 8} {
        .lb configure -height 8 -yscrollcommand [list .s set]
        scrollbar .s -orient vertical -highlightthickness 0\
                -elementborderwidth 2 -command [list .lb yview]
        pack .s -side right -fill y
    } else {
        .lb configure -height 0
    }
    pack .lb -side left -fill y
    update
}
main

# vi:sw=4 sts=4 ts=8 et

