Menu edition

One useful feature added in SmartDevicesPlus 5 is the possibility to add menu items directly from the object itself.

In each "Work With for Smart Devices" and "Panel For Smart Devices" you will have the property "Include in Slide menu":

The Panel for Smart Devices editor shows the PanelSmartDevices1 properties, including Name, Description, Module/Folder, Object Visibility, Main program, Caption, and SmartDevicesPlus settings (Apply SmartDevicesPlus on save, Include in slide menu); a red arrow points from the panel canvas toward the Network and Data Selector sections lower in the property list.

If you set this property as True the following properties will be enabled:

The Properties panel for PanelSmartDevices1 shows "Include in slide menu" set to True, revealing a highlighted Slide menu option group with Title ("Panel Smart Devices1"), Image (none), Type (Item), and Position (1) fields boxed in red.

"Title":

Specifies the title which appears in the menu.

"Image": 

Specifies the image which appears in the menu.

"Type": 

Specifies the type of the item. This could be:

  • Item
  • ItemSeparator
  • Link

"Position":

Specifies in which position of the menu will appear. The order counts from the top of the menu.

When you save the object the data provider which loads the menu and the Startup Object of the application will be modified.

In the Data Provider will be added the following:

Source code of the generated SDPMenuOptionsDP Data Provider lists SDPMenuOptionsItem entries; a red-boxed entry shows Id "PanelSmartDevices1", Title "Panel Smart Devices1", ComponentToCall "sd:PanelSmartDevices1", an Icon reference, Type Item, and OrderIndex 1, generated automatically from the panel's slide menu option.

While in the Startup Object:

The Events tab source code shows the CompilationDummyEvent event with a Composite block generated by SmartDevicesPlus, calling SDPDocumentationKbV1SDHome(), PanelSmartDevices1(), and WorkWithDevicesProduct.Product.List(); a red arrow points to the PanelSmartDevices1() call, indicating the object referenced so it is included at runtime.

Important:  This behavior will be available as long as you keep the default Data Provider used in the menu of the application. When you change the default Data Provider used to load the menu of the application, SmartDevicesPlus considers that the developer is in control of the menu management, so the property “Include in Slide Menu” won’t be available anymore. If you want to let SmartDevicesPlus manage the menu again, you should use the default Data Provider again.