Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
350
Dynamically add manu items under popup tool
posted

I have a background worker that checks for updates. If there is updates I want to be able to dynamically load the name of the updates under a popup menu tool item within the toolbar. These items will be just labels.

How would I go about doing the adding of the new items to the popup menu tool

Parents
No Data
Reply
  • 290
    Suggested Answer
    posted

    Hello,

     

     

     

     

     

     

     

    You can either create a PopupMenuTool and add it to a particular Toolbar or use an existing PopupMenuTool and create label tools with these update captions and add it to the PopupMenuTool.

    Take a look at the following code:

    PopupMenuTool
    pt1 = (PopupMenuTool) this.ultraToolbarsManager1.Tools["PopupMenuTool1"];

    //Create a LabelTool with appropriate caption
    LabelTool l1 = new LabelTool("LabelToolKey1");
    l1.SharedProps.Caption =
    "Update1";

    //Add this labeltool to the UltraToolbarsManager's Tools collection
    this
    .ultraToolbarsManager1.Tools.Add(l1);

    //Add this tool to the ToolsCollection of the corresponding PopupMenuTool

    pt1.Tools.AddTool(
    "LabelToolKey1");

    Please let me know if this helps.

    Thanks
    Purnima

Children
No Data