A colleague kindly pointed out that in the User Guide, it states: "To put an & or / character in the text of a menu, double the characters: && or //.
Putting the ( character anywhere in a line disables the menu item. To put a ( character in a menu item without disabling it, precede it with a backslash: \(." So that still leaves whether there is any way to escape "!" (exclamation) or "-" (minus sign) as the first character and a "|" (vertical bar) in the file name? I can build a test stack an try !! and -- and \! and \- and so on, but I was hoping some one had a definitive answer. On 12/1/2015 5:30 PM, Paul Dupuis wrote: > I have an issue with creating a "Recent Files" menu and I am wondering > if anyone on the list has a work-around: > > I do not want to pose any restrictions on files names other than what > the operating system itself does. > > So I build a menu of file names. However, special characters in menu > items create accelerator keys, disable menus, set or unset check boxes > and so on: > > Dictionary for "menu" excerpt: > The syntax for menu item strings is: > [<flags>] <label> ['/' <accelerator> ['|' <tag>]] > > Where <flags> may include: > !<c|n|r> (the menu item has respectively, a check, no check, or a > selected radio button) > ((the menu item is disabled) > -(the menu item is replaced with a menu separator) > multiple tab characters (where the number of tabs specifes the depth > of the menu item. Use this to create submenus) > > So, since a file name CAN begin with ! or ( or - (but not tab), is there > a way to 'escape' these characters in the menu system so they are > displayed normally? Replacing / with // works to escape a / in the name. > What about the vertical bar "|"? > > I tried escaping a ! at the start of a name with /! and that does not work. > > Thank you for any answers, > > _______________________________________________ > use-livecode mailing list > [email protected] > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > _______________________________________________ use-livecode mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
