source /home/ventana/source/elem_prop.tcl

#--------------------------------------------------
# initialize and set variable for the window name
#--------------------------------------------------
set anaout .analog_output_list




##############################################################
# "dispay" is the path of the entry window where we want
# to display our selection
##############################################################


proc analog_output_list { display } {

   #-------------------
   # Declare variable
   #-------------------
   global out
   global anaout
   	
   if [winfo exists $anaout] {  destroy $anaout }
   #-------------------------------------------------------
   # Create a new window that contains the analog list
   #-------------------------------------------------------
   global env
   set env(DISPLAY) :0
   toplevel $anaout
   set out $display


   button $anaout.in1 -relief flat -text "Analog Output #1" -command { anaout_selected $out  "Analog Output 1"}
   button $anaout.in2 -relief flat -text "Analog Output #2" -command { anaout_selected $out  "Analog Output 2"}
   button $anaout.in3 -relief flat -text "Analog Output #3" -command { anaout_selected $out  "Analog Output 3"}
   button $anaout.in4 -relief flat -text "Analog Output #4" -command { anaout_selected $out  "Analog Output 4"}
   button $anaout.in5 -relief flat -text "Analog Output #5" -command { anaout_selected $out  "Analog Output 5"}
   button $anaout.in6 -relief flat -text "Analog Output #6" -command { anaout_selected $out  "Analog Output 6"}
   button $anaout.in7 -relief flat -text "Analog Output #7" -command { anaout_selected $out  "Analog Output 7"}
   button $anaout.in8 -relief flat -text "Analog Output #8" -command { anaout_selected $out  "Analog Output 8"}
   button $anaout.in9 -relief flat -text "Analog Output #9" -command { anaout_selected $out  "Analog Output 9"}
   button $anaout.in10 -relief flat -text "Analog Output #10" -command { anaout_selected $out  "Analog Output 10"}
   button $anaout.in11 -relief flat -text "Analog Output #11" -command { anaout_selected $out  "Analog Output 11"}
   button $anaout.in12 -relief flat -text "Analog Output #12" -command { anaout_selected $out  "Analog Output 12"}
   button $anaout.in13 -relief flat -text "Analog Output #13" -command { anaout_selected $out  "Analog Output 13"}
   button $anaout.in14 -relief flat -text "Analog Output #14" -command { anaout_selected $out  "Analog Output 14"}
   button $anaout.in15 -relief flat -text "Analog Output #15" -command { anaout_selected $out  "Analog Output 15"}
   button $anaout.in16 -relief flat -text "Analog Output #16" -command { anaout_selected $out  "Analog Output 16"}





   for {set i 1 } {$i <= 16 } {incr i} {

   	pack $anaout.in$i -side top


   }

  button $anaout.b -text Close -command {destroy $anaout}
  pack $anaout.b






   proc anaout_selected { display text } {

      global anaout

      $display configure -state normal
      $display delete 0 100
      $display insert 0 $text
      $display configure -state disabled


      # Close the output list after
      destroy $anaout

   # end proc list_output
   }

#end of proc "analog_output_list"
}