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
200
Howto show Captions in toolbars (groups)
posted

Hi.

After I've been dotting my way through the framework and overloadet google servers I hope someone can help me with this little question :)

I'm trying to make captions for my toolbars. Like the ones shown below.

So far I've created the following code giving the below toolbar

LiveViewIcon = new ButtonTool("_HomeIcon");
LiveViewIcon.SharedProps.Caption = L.t("Home");
LiveViewIcon.SharedProps.AppearancesLarge.Appearance.Image = ImageLoader.GetImage("Home_27x30");
LiveViewIcon.SharedProps.DisplayStyle = ToolDisplayStyle.ImageAndText;
LiveViewIcon.SharedProps.Enabled = true;
LiveViewIcon.SharedProps.Visible = true;
LiveViewIcon.InstanceProps.IsFirstInGroup = true;
m_UTManager.Tools.Add(LiveViewIcon);

ListViewIcon = new ButtonTool("_DataIcon");
ListViewIcon.SharedProps.Caption = L.t("Data");
ListViewIcon.SharedProps.AppearancesLarge.Appearance.Image = ImageLoader.GetImage("Lists_30x30");
ListViewIcon.SharedProps.DisplayStyle = ToolDisplayStyle.ImageAndText;
ListViewIcon.SharedProps.Enabled = true;
ListViewIcon.SharedProps.Visible = true;
ListViewIcon.InstanceProps.IsFirstInGroup = true;
m_UTManager.Tools.Add(ListViewIcon);

//Settings
m_UTManager.Toolbars.AddToolbar(m_ViewsQuickLaunch);
m_UTManager.Toolbars[m_ViewsQuickLaunch].DockedRow = 1;
m_UTManager.Toolbars[m_ViewsQuickLaunch].DockedColumn = 0;
m_UTManager.Toolbars[m_ViewsQuickLaunch].Tools.AddToolRange(new string[] { "_HomeIcon", "_DataIcon"});

m_UTManager.Toolbars[m_ViewsQuickLaunch].Settings.UseLargeImages = Infragistics.Win.DefaultableBoolean.True;
m_UTManager.Toolbars[m_ViewsQuickLaunch].Settings.CaptionPlacement = Infragistics.Win.TextPlacement.BelowImage;
m_UTManager.Toolbars[m_ViewsQuickLaunch].Settings.Appearance.FontData.Bold = Infragistics.Win.DefaultableBoolean.True;

 

 

Parents
  • 6158
    Verified Answer
    Offline posted

    Hello,

    The captions you are referring to in the first image, are from the RibbonGroup.  RibbonGroups are only available within a RibbonTab when using the Office 2007 Ribbon UI style. Captions of this nature cannot be implemented on Standard and MainMenu toolbars.

    The closest you could get to group captions on a standard toolbar, would be to create individual user controls for each group, that contained both a UltraToolbarManager with the tools within a group, as well as the caption. You can then place this user control on the Toolbar using a ControlContainerTool. Unfortunately,  all the event firing would occur on the user controls, so you'd have to propagate the event firing back to the main form.

    I would recommend entering a feature request so functionility of this nature can possibly be addressed in a future version.

    Thanks,

    Chris

Reply Children
No Data