By Adam Nagy
When the user hovers over a Ribbon button, then if the tooltip is progressive (i.e. provides an expanded description that shows only after a couple of seconds) then a message at the bottom of that notifies the user that the help information for that button can be envoked by pressing F1 while the tooltip is showing. You can set this up through the API for your own buttons as well.
Note: this F1 functionality works for the tooltip even if that is not progressive.
You just need to handle the ButtonDefinition's OnHelp event. I modified the SimpleAddIn sample project's DrawSlotButton.cs file with the following code which also adds extended help:
public DrawSlotButton(
string displayName, string internalName,
CommandTypesEnum commandType, string clientId, string description,
string tooltip, Icon standardIcon, Icon largeIcon,
ButtonDisplayEnum buttonDisplayType)
: base(
displayName, internalName, commandType, clientId,
description, tooltip, standardIcon, largeIcon, buttonDisplayType)
{
base.ButtonDefinition.OnHelp +=
new ButtonDefinitionSink_OnHelpEventHandler(
ButtonDefinition_OnHelp);
base.ButtonDefinition.ProgressiveToolTip.Title =
"Additional Help";
base.ButtonDefinition.ProgressiveToolTip.ExpandedDescription =
"Additional description. Progressive tooltip is " +
"not needed for the F1 help to work";
}
void ButtonDefinition_OnHelp(
NameValueMap Context, out HandlingCodeEnum HandlingCode)
{
HandlingCode = HandlingCodeEnum.kEventHandled;
// Show the webpage with the help of the current
// Ribbon button
// System.Diagnostics.Process is being used here
Process.Start("http://www.autodesk.com");
}