Hi expert,
It's me again... This time the KeyTip won't work. I just added a ButtonTool into a group, then I press Alt, no keytip shown on that buttonTool.
myButtonTool.InstanceProps.KeyTip = "C";
Please help...
Hello Ming,
Please take a look at the attached sample and video file for more details and if you have any questions, feel free to write me
Regards
Here is the sample
Hi Georgi,
Thank you for your sample, but it seems not solve my problem...
I'm not using designer, I create buttontool dynamiclly in code behind, which may cause some problems I dont know.
The code i'm using is shown below, do you find any problems? (Sorry about the format, please copy and paste code to VS!)
private ButtonTool AddRibbonButtonTool(RibbonGroup Group, string key, string caption, object largeImage, object smallImage, string keyTip, Shortcut shortCut, RibbonToolSize ribbonToolSize, string StatusText, string ToolTipText, string workItemStateKey, string workItemCommandKey, bool isFirstInGroup) { ButtonTool buttonTool = new ButtonTool(key); buttonTool.SharedProps.Caption = caption; if (largeImage != null) buttonTool.SharedProps.AppearancesLarge.Appearance.Image = largeImage; if (smallImage != null) buttonTool.SharedProps.AppearancesSmall.Appearance.Image = smallImage; //buttonTool.SharedProps.KeyTip = keyTip; if (shortCut != Shortcut.None) buttonTool.SharedProps.Shortcut = shortCut; buttonTool.SharedProps.StatusText = StatusText; buttonTool.SharedProps.ToolTipText = ToolTipText; this.UIElements.ToolbarsManager.Tools.Add(buttonTool);// add into toolbarManager. ButtonTool groupButtonTool = Group.Tools.AddTool(key) as ButtonTool;// add into group, and get the instance
if (ribbonToolSize != RibbonToolSize.Default) groupButtonTool.InstanceProps.PreferredSizeOnRibbon = ribbonToolSize;
groupButtonTool.InstanceProps.IsFirstInGroup = isFirstInGroup; groupButtonTool.InstanceProps.KeyTip = keyTip; return groupButtonTool; }
Please take a look at the attached sample and video file and if you have any questions, feel free to write me
here is the video file
Hi,
If you need any additional assistance don’t hesitate to ask.