Type | Description | |||
String | A String expression that specifies the title of the item's tooltip. |
How can I assign a tooltip to an item?
VBA (MS Access, Excell...)
With Ribbon1 With .Items.Add("ToolTip") .TooltipTitle = "Title" .Tooltip = "This is a bit of text that should be shown when cursor hovers the item" End With .Refresh End With
VB6
With Ribbon1 With .Items.Add("ToolTip") .TooltipTitle = "Title" .Tooltip = "This is a bit of text that should be shown when cursor hovers the item" End With .Refresh End With
VB.NET
With Exribbon1 With .Items.Add("ToolTip") .TooltipTitle = "Title" .Tooltip = "This is a bit of text that should be shown when cursor hovers the item" End With .Refresh() End With
VB.NET for /COM
With AxRibbon1 With .Items.Add("ToolTip") .TooltipTitle = "Title" .Tooltip = "This is a bit of text that should be shown when cursor hovers the item" End With .Refresh() End With
C++
/* Copy and paste the following directives to your header file as it defines the namespace 'EXRIBBONLib' for the library: 'ExRibbon 1.0 Control Library' #import <ExRibbon.dll> using namespace EXRIBBONLib; */ EXRIBBONLib::IRibbonPtr spRibbon1 = GetDlgItem(IDC_RIBBON1)->GetControlUnknown(); EXRIBBONLib::IItemPtr var_Item = spRibbon1->GetItems()->Add(L"ToolTip",vtMissing,vtMissing); var_Item->PutTooltipTitle(L"Title"); var_Item->PutTooltip(L"This is a bit of text that should be shown when cursor hovers the item"); spRibbon1->Refresh();
C++ Builder
Exribbonlib_tlb::IItemPtr var_Item = Ribbon1->Items->Add(L"ToolTip",TNoParam(),TNoParam()); var_Item->TooltipTitle = L"Title"; var_Item->Tooltip = L"This is a bit of text that should be shown when cursor hovers the item"; Ribbon1->Refresh();
C#
exontrol.EXRIBBONLib.Item var_Item = exribbon1.Items.Add("ToolTip",null,null); var_Item.TooltipTitle = "Title"; var_Item.Tooltip = "This is a bit of text that should be shown when cursor hovers the item"; exribbon1.Refresh();
JScript/JavaScript
<BODY onload='Init()'> <OBJECT CLASSID="clsid:DDF58CFA-750F-45E0-8A00-CFBE431702E2" id="Ribbon1"></OBJECT> <SCRIPT LANGUAGE="JScript"> function Init() { var var_Item = Ribbon1.Items.Add("ToolTip",null,null); var_Item.TooltipTitle = "Title"; var_Item.Tooltip = "This is a bit of text that should be shown when cursor hovers the item"; Ribbon1.Refresh(); } </SCRIPT> </BODY>
VBScript
<BODY onload='Init()'> <OBJECT CLASSID="clsid:DDF58CFA-750F-45E0-8A00-CFBE431702E2" id="Ribbon1"></OBJECT> <SCRIPT LANGUAGE="VBScript"> Function Init() With Ribbon1 With .Items.Add("ToolTip") .TooltipTitle = "Title" .Tooltip = "This is a bit of text that should be shown when cursor hovers the item" End With .Refresh End With End Function </SCRIPT> </BODY>
C# for /COM
EXRIBBONLib.Item var_Item = axRibbon1.Items.Add("ToolTip",null,null); var_Item.TooltipTitle = "Title"; var_Item.Tooltip = "This is a bit of text that should be shown when cursor hovers the item"; axRibbon1.Refresh();
X++ (Dynamics Ax 2009)
public void init() { COM com_Item; anytype var_Item; ; super(); var_Item = COM::createFromObject(exribbon1.Items()).Add("ToolTip"); com_Item = var_Item; com_Item.TooltipTitle("Title"); com_Item.Tooltip("This is a bit of text that should be shown when cursor hovers the item"); exribbon1.Refresh(); }
Delphi 8 (.NET only)
with AxRibbon1 do begin with Items.Add('ToolTip',Nil,Nil) do begin TooltipTitle := 'Title'; Tooltip := 'This is a bit of text that should be shown when cursor hovers the item'; end; Refresh(); end
Delphi (standard)
with Ribbon1 do begin with Items.Add('ToolTip',Null,Null) do begin TooltipTitle := 'Title'; Tooltip := 'This is a bit of text that should be shown when cursor hovers the item'; end; Refresh(); end
VFP
with thisform.Ribbon1 with .Items.Add("ToolTip") .TooltipTitle = "Title" .Tooltip = "This is a bit of text that should be shown when cursor hovers the item" endwith .Refresh endwith
dBASE Plus
local oRibbon,var_Item oRibbon = form.Activex1.nativeObject var_Item = oRibbon.Items.Add("ToolTip") var_Item.TooltipTitle = "Title" var_Item.Tooltip = "This is a bit of text that should be shown when cursor hovers the item" oRibbon.Refresh()
XBasic (Alpha Five)
Dim oRibbon as P Dim var_Item as P oRibbon = topparent:CONTROL_ACTIVEX1.activex var_Item = oRibbon.Items.Add("ToolTip") var_Item.TooltipTitle = "Title" var_Item.Tooltip = "This is a bit of text that should be shown when cursor hovers the item" oRibbon.Refresh()
Visual Objects
local var_Item as IItem var_Item := oDCOCX_Exontrol1:Items:Add("ToolTip",nil,nil) var_Item:TooltipTitle := "Title" var_Item:Tooltip := "This is a bit of text that should be shown when cursor hovers the item" oDCOCX_Exontrol1:Refresh()
PowerBuilder
OleObject oRibbon,var_Item oRibbon = ole_1.Object var_Item = oRibbon.Items.Add("ToolTip") var_Item.TooltipTitle = "Title" var_Item.Tooltip = "This is a bit of text that should be shown when cursor hovers the item" oRibbon.Refresh()
Visual DataFlex
Procedure OnCreate Forward Send OnCreate Variant voItems Get ComItems to voItems Handle hoItems Get Create (RefClass(cComItems)) to hoItems Set pvComObject of hoItems to voItems Variant voItem Get ComAdd of hoItems "ToolTip" Nothing Nothing to voItem Handle hoItem Get Create (RefClass(cComItem)) to hoItem Set pvComObject of hoItem to voItem Set ComTooltipTitle of hoItem to "Title" Set ComTooltip of hoItem to "This is a bit of text that should be shown when cursor hovers the item" Send Destroy to hoItem Send Destroy to hoItems Send ComRefresh End_Procedure
XBase++
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oItem LOCAL oRibbon oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oRibbon := XbpActiveXControl():new( oForm:drawingArea ) oRibbon:CLSID := "Exontrol.Ribbon.1" /*{DDF58CFA-750F-45E0-8A00-CFBE431702E2}*/ oRibbon:create(,, {10,60},{610,370} ) oItem := oRibbon:Items():Add("ToolTip") oItem:TooltipTitle := "Title" oItem:Tooltip := "This is a bit of text that should be shown when cursor hovers the item" oRibbon:Refresh() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN