#
#
# Copyright (C) 1995 Christopher M Sedore
#
# This code may be modified and reused for any purpose.
#
# dispui.tcl sample program 
#
#

load ntsys.dll ntsys

proc dispUG {id } {
  global av
  
  if {![info exists av]} {
    set av 0
  }
  
  set nw .dlg[incr av]
  set nwt [set nw].txt

  toplevel $nw

  text $nwt
  
  $nwt insert end [NT_UserGetGroups \\\\manager $id]

  pack $nwt

}

listbox .lb -width 30 -height 20 -yscrollcommand ".sb set"
scrollbar .sb -command {.lb yview}

pack .sb -side right -fill y
pack .lb -side left 

set ul [NT_UserEnum \\\\manager {} ]

foreach a $ul { .lb insert end [lindex $a 0] }

bind .lb <Double-Button-1> {dispUG [.lb get [.lb curselection]]}