Delete Menu Item from Option Menu Button

Bob Sneidar bobsneidar at iotecdigital.com
Mon Nov 16 12:46:34 EST 2020


I always use “the text of” to make it more readable.

Bob S


On Nov 14, 2020, at 4:31 PM, Mark Wieder via use-livecode <use-livecode at lists.runrev.com<mailto:use-livecode at lists.runrev.com>> wrote:

On 11/14/20 4:03 PM, Roger Guay via use-livecode wrote:
Can someone tell me how to delete a menuItem from an Option Menu button programmatically?
Standing by ready to apply dope slap.

No dope slap necessary - it's not really obvious.
The menuItems are stored as the text of the button, so you can get and set it easily.

put button <whichButton> into tText
-- edit tText here
-- you can do a lineOffset and delete line x of tText
put tText into button <whichButton>

--
Mark Wieder
ahsoftware at gmail.com<mailto:ahsoftware at gmail.com>



More information about the use-livecode mailing list