Help - Button Menu Question??

Ralph R. Forehand ralf at
Wed Nov 10 11:34:14 EST 2004

Thierry, Jan, Alain and Frank,

Thank You all for your assistance. As you might expect no one single answer met my needs but the combination of concepts, ideas and scripts you provided were very valuable guidance to me.

Below script is what I finally settled on as meeting my needs. Give it a try and hope it proves useful to all.

THANKS AGAIN and Take Care,

-- Previously set-up elsewhere in stack
 global userNames  
 put "Jones,Smith,Doe,Test,Fifth,Sixth,Seventh" into userNames

-- Set-up variable length pull-down button and items
on mouseDown   
  global userNames
  put number of items in userNames into userCount
  put "User?" & Return into userList
  repeat with i = 1 to userCount
    put item i of userNames & Return after userList
  end repeat
  put format(userList) into tItems
  put num of lines of me
  -- sort tItems  # optional
  set the text of me to tItems
  set the menuLines of me to num of lines of me
end mouseDown

-- Select item from menu
menuPick   # select menu item

on menuPick theItem -- in button pulldown menu  
  set name of me to theItem  

-- Do whatever with menu item (User) picked
-- Reset button to "User?" prompt for next pick
  put "User??" into first Item of me
end menuPick


More information about the Use-livecode mailing list