Member 8784100 Ответов: 0

Добавление вкладки ленты во время выполнения


Is it possible to add a ribbon tab at run time ? I am looking for a similar way of adding tabs like we add buttons runtime to a ribbon split button . Any help would be greatly appreciated.

I am referring to "Windows Ribbon for WinForms, Part 15 – Use Ribbon as External DLL" article <a href="http://web3.codeproject.com/Articles/62524/Windows-Ribbon-for-WinForms-Part-Use-Ribbon-as"></a>[<a href="http://web3.codeproject.com/Articles/62524/Windows-Ribbon-for-WinForms-Part-Use-Ribbon-as" target="_blank" title="New Window">^</a>] 


Thanks/Saurav.


Что я уже пробовал:

I tried adding a ribbon tab run time but looks like it just adds to the collection and does not show up in the ribbon.

<pre lang="c#">private void AddTabItem(string strLabel, uint uCmdID)
        {
            try
            {
                RibbonTab tab;
                tab = new RibbonTab(ribbon1, uCmdID);
                tab.Label = strLabel;
                tab.TooltipTitle = strLabel;
            }
            catch (Exception ex)
            {
                string strExcepMsg = ex.Message;
            }
        }


ribbon1 - это мой ленточный объект.

Пожалуйста, совет.

0 Ответов