Back Forward
Lingo - Properties

Items


Description:

List of menu items. Allows to access and modify the menu tree dynamically.
Type:

linearList[ propList[ propName symbol: propValue ] ]
propName values - propValue types - description:

#Name - string - menu item name (you must observe certain conventions)
#Caption - string - displayed caption
#Visible - integer 0|1 - visibility on/off
#Enabled - integer 0|1 - active on/off
#Hidden - integer 0|1 - hide on/off
#Checked - integer 0|1 - checked on/off
#Bitmap - picture / bitmap cast member / integer - bitmap displayed next to the menu item
#Subitems - linearList[ propList[ symbol propName: propValue ] ] - list of sub-items
Operations:

Read / Write
Example:
myItems = member("StarMenu1").Items
myItems[1][#Caption] = "Our folder"
myItems[1][#Subitems][1][#Visible] = 0
member("StarMenu1").Items = myItems

put member("StarMenu1").Items
-- [[#Name: "Folder", #Caption: "Our folder", #Visible: 1, #Enabled: 1, #Hidden: 0, 
   #Checked: 0, #Bitmap: 0, #SubItems: [[#Name: "Local", #Caption: "Local", #Visible: 0, 
   #Enabled: 1, #Hidden: 0, #Checked: 0, #Bitmap: 0, #SubItems: []], [#Name: "Global", 
   #Caption: "Global", #Visible: 1, #Enabled: 1, #Hidden: 0, #Checked: 0, #Bitmap: 0, 
   #SubItems: []]]], [#Name: "Loaction", #Caption: "Location", #Visible: 1, #Enabled: 1, 
   #Hidden: 0, #Checked: 0, #Bitmap: 0, #SubItems: []]]
  
Note:

The Items property is a linear list. Its members are property lists that describe root menu items parameters.
If a menu item has sub-items they are listed in #Subitems. Its format is the same as Items. This way the menu tree is mapped into Lingo lists.

The type of sub-property Bitmap is the same as Background.

When you modify this property in Lingo you should first read it into a variable, modify required list elements and then store it back.