Klaus' suggestion is a good one, and if you do it often you can wrap it in a handler like this so it's a one-liner whenever you need it:
Code: Select all
on SetOption pBtnObj, pItem
lock messages
set the wholematches to true
set the menuHistory of pBtnObj to lineoffset( pItem, the text of pBtnObj)
unlock messages
end SetOption
FWIW, I submitted a request to extend the behavior of "set the label..." this morning, and Mark Waddingham noted some interesting aspects I'd not originally considered - feel free to chime in with your own thoughts there:
http://quality.runrev.com/show_bug.cgi?id=11917