520 views
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.

Thanks.

1 Answer

0 votes
by

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 - Archive

Welcome to the Ask Embedded Wizard archive. This community forum served us well for many years, but we've evolved our support approach!

Your resources:

The Embedded Wizard Online Documentation provides comprehensive documentation, tutorials, examples and ready-to-use software packages.

For dedicated assistance, explore our Embedded Wizard Product Support.

You can still browse the valuable discussions from our community history here.

Embedded Wizard Website | Privacy Policy | Imprint

...