Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can a menu/toolbar item's text-title be a string variable?
#2
Normally not, but you can use function DynamicMenu or DynamicToolbar to create menu/tb at run time, with variables. Using templates simplifies this.

Example
Menu Menu17
Code:
Copy      Help
Macro1 :mac "%s"
Macro2 :mac "%s"

Macro
Code:
Copy      Help
str m1="Macro1"
str m2="Macro2"
str s.format(_s.getmacro("Menu17") m1 m2)
DynamicMenu s "temp_Menu17"

Menu17 is used as template. %s are replaced with variables.


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)