in Embedded Wizard Studio by
Hi Paul

Could u tell like how to add or remove items from menu dynamically in form of queue with some example.


1 Answer

0 votes

Hello Manvitha,

I'm not sure what you mean with queue. However, if you are using the menus created from component templates, you can add/remove the item dynamically by using the methods Add() and Remove(). For example:

1. to add a menu item at the runtime:

var YourUnit::TheItemClass item = new YourUnit::TheItemClass;
var Core::Group            menu = ...

// Configure the item, etc.
item.Caption = "Some Caption";

// Add the item to the menu
menu.Add( item, 0 );

2. to remove an item at the runtime

var Core::Group item = ...
var Core::Group menu = item.Owner;

// Remove the item from the menu
menu.Remove( item );

I hope it helps you further.

Best regards

Paul Banach


Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint