Applies To: |
|
Summary: |
The Citect Help does not cite an example on
how to pass Variable Tags or Cicode Variables to the sMenuItems
argument when calling the Cicode DspPopupMenu command in Citect. I
can only get the menu items to display when I hard-code the string
menu items. For example:
FUNCTION DspMyMenu() INT iSelection; DspPopupMenu(0,
"MenuItem1,MenuItem2,MenuItem3"); How can one pass Variable Tags or Cicode Variables as one string for the sMenuItems parameter? |
Solution: |
The following is an example of how to do
this using Cicode Variables, which must be initialized after
declaring the function:
FUNCTION DspMyMenu()
END To accomplish the same thing using Variable Tags (disk, memory or external / PLC), you use the same syntax (above) when calling DspPopupMenu while leaving out the variable declarations (preceding it). You will still need to assign string values to each of the tags being used as menu items (i.e. by means of a command button, startup function, etc.). |
Keywords: |
Related Links
Attachments