Type | Description | |||
Long | A long expression that specifies the identifier of the item where the current popup should be displayed. |
How can I display the drop down popup to a different position?
VBA (MS Access, Excell...)
With Ribbon1 With .Items With .Add("",2) .GroupPopup = 1 With .Items With .Add("Popup 1",2,100) .ShowPopupAlign = 1 .ShowPopupArrow = False With .Items .PopupAppearance = 3 .Add "Item 1" .Add "Item 2" .Add "Item 3" End With End With With .Add("Popup 2",2,200) .ShowPopupAt = 100 .ShowPopupArrow = False With .Items .PopupAppearance = 3 .Add "Item 4" .Add "Item 5" .Add "Item 6" End With End With End With End With End With .Refresh End With
VB6
With Ribbon1 With .Items With .Add("",2) .GroupPopup = exGroupPopup With .Items With .Add("Popup 1",2,100) .ShowPopupAlign = exShowPopupAlignDown .ShowPopupArrow = False With .Items .PopupAppearance = RaisedBorder .Add "Item 1" .Add "Item 2" .Add "Item 3" End With End With With .Add("Popup 2",2,200) .ShowPopupAt = 100 .ShowPopupArrow = False With .Items .PopupAppearance = RaisedBorder .Add "Item 4" .Add "Item 5" .Add "Item 6" End With End With End With End With End With .Refresh End With
VB.NET
With Exribbon1 With .Items With .Add("",2) .GroupPopup = exontrol.EXRIBBONLib.GroupPopupEnum.exGroupPopup With .Items With .Add("Popup 1",2,100) .ShowPopupAlign = exontrol.EXRIBBONLib.ShowPopupAlignEnum.exShowPopupAlignDown .ShowPopupArrow = False With .Items .PopupAppearance = exontrol.EXRIBBONLib.AppearanceEnum.RaisedBorder .Add("Item 1") .Add("Item 2") .Add("Item 3") End With End With With .Add("Popup 2",2,200) .ShowPopupAt = 100 .ShowPopupArrow = False With .Items .PopupAppearance = exontrol.EXRIBBONLib.AppearanceEnum.RaisedBorder .Add("Item 4") .Add("Item 5") .Add("Item 6") End With End With End With End With End With .Refresh() End With
VB.NET for /COM
With AxRibbon1 With .Items With .Add("",2) .GroupPopup = EXRIBBONLib.GroupPopupEnum.exGroupPopup With .Items With .Add("Popup 1",2,100) .ShowPopupAlign = EXRIBBONLib.ShowPopupAlignEnum.exShowPopupAlignDown .ShowPopupArrow = False With .Items .PopupAppearance = EXRIBBONLib.AppearanceEnum.RaisedBorder .Add("Item 1") .Add("Item 2") .Add("Item 3") End With End With With .Add("Popup 2",2,200) .ShowPopupAt = 100 .ShowPopupArrow = False With .Items .PopupAppearance = EXRIBBONLib.AppearanceEnum.RaisedBorder .Add("Item 4") .Add("Item 5") .Add("Item 6") End With End With End With End With 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::IItemsPtr var_Items = spRibbon1->GetItems(); EXRIBBONLib::IItemPtr var_Item = var_Items->Add(L"",long(2),vtMissing); var_Item->PutGroupPopup(EXRIBBONLib::exGroupPopup); EXRIBBONLib::IItemsPtr var_Items1 = var_Item->GetItems(); EXRIBBONLib::IItemPtr var_Item1 = var_Items1->Add(L"Popup 1",long(2),long(100)); var_Item1->PutShowPopupAlign(EXRIBBONLib::exShowPopupAlignDown); var_Item1->PutShowPopupArrow(VARIANT_FALSE); EXRIBBONLib::IItemsPtr var_Items2 = var_Item1->GetItems(); var_Items2->PutPopupAppearance(EXRIBBONLib::RaisedBorder); var_Items2->Add(L"Item 1",vtMissing,vtMissing); var_Items2->Add(L"Item 2",vtMissing,vtMissing); var_Items2->Add(L"Item 3",vtMissing,vtMissing); EXRIBBONLib::IItemPtr var_Item2 = var_Items1->Add(L"Popup 2",long(2),long(200)); var_Item2->PutShowPopupAt(100); var_Item2->PutShowPopupArrow(VARIANT_FALSE); EXRIBBONLib::IItemsPtr var_Items3 = var_Item2->GetItems(); var_Items3->PutPopupAppearance(EXRIBBONLib::RaisedBorder); var_Items3->Add(L"Item 4",vtMissing,vtMissing); var_Items3->Add(L"Item 5",vtMissing,vtMissing); var_Items3->Add(L"Item 6",vtMissing,vtMissing); spRibbon1->Refresh();
C++ Builder
Exribbonlib_tlb::IItemsPtr var_Items = Ribbon1->Items; Exribbonlib_tlb::IItemPtr var_Item = var_Items->Add(L"",TVariant(2),TNoParam()); var_Item->GroupPopup = Exribbonlib_tlb::GroupPopupEnum::exGroupPopup; Exribbonlib_tlb::IItemsPtr var_Items1 = var_Item->Items; Exribbonlib_tlb::IItemPtr var_Item1 = var_Items1->Add(L"Popup 1",TVariant(2),TVariant(100)); var_Item1->ShowPopupAlign = Exribbonlib_tlb::ShowPopupAlignEnum::exShowPopupAlignDown; var_Item1->ShowPopupArrow = false; Exribbonlib_tlb::IItemsPtr var_Items2 = var_Item1->Items; var_Items2->PopupAppearance = Exribbonlib_tlb::AppearanceEnum::RaisedBorder; var_Items2->Add(L"Item 1",TNoParam(),TNoParam()); var_Items2->Add(L"Item 2",TNoParam(),TNoParam()); var_Items2->Add(L"Item 3",TNoParam(),TNoParam()); Exribbonlib_tlb::IItemPtr var_Item2 = var_Items1->Add(L"Popup 2",TVariant(2),TVariant(200)); var_Item2->ShowPopupAt = 100; var_Item2->ShowPopupArrow = false; Exribbonlib_tlb::IItemsPtr var_Items3 = var_Item2->Items; var_Items3->PopupAppearance = Exribbonlib_tlb::AppearanceEnum::RaisedBorder; var_Items3->Add(L"Item 4",TNoParam(),TNoParam()); var_Items3->Add(L"Item 5",TNoParam(),TNoParam()); var_Items3->Add(L"Item 6",TNoParam(),TNoParam()); Ribbon1->Refresh();
C#
exontrol.EXRIBBONLib.Items var_Items = exribbon1.Items; exontrol.EXRIBBONLib.Item var_Item = var_Items.Add("",2,null); var_Item.GroupPopup = exontrol.EXRIBBONLib.GroupPopupEnum.exGroupPopup; exontrol.EXRIBBONLib.Items var_Items1 = var_Item.Items; exontrol.EXRIBBONLib.Item var_Item1 = var_Items1.Add("Popup 1",2,100); var_Item1.ShowPopupAlign = exontrol.EXRIBBONLib.ShowPopupAlignEnum.exShowPopupAlignDown; var_Item1.ShowPopupArrow = false; exontrol.EXRIBBONLib.Items var_Items2 = var_Item1.Items; var_Items2.PopupAppearance = exontrol.EXRIBBONLib.AppearanceEnum.RaisedBorder; var_Items2.Add("Item 1",null,null); var_Items2.Add("Item 2",null,null); var_Items2.Add("Item 3",null,null); exontrol.EXRIBBONLib.Item var_Item2 = var_Items1.Add("Popup 2",2,200); var_Item2.ShowPopupAt = 100; var_Item2.ShowPopupArrow = false; exontrol.EXRIBBONLib.Items var_Items3 = var_Item2.Items; var_Items3.PopupAppearance = exontrol.EXRIBBONLib.AppearanceEnum.RaisedBorder; var_Items3.Add("Item 4",null,null); var_Items3.Add("Item 5",null,null); var_Items3.Add("Item 6",null,null); 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_Items = Ribbon1.Items; var var_Item = var_Items.Add("",2,null); var_Item.GroupPopup = 1; var var_Items1 = var_Item.Items; var var_Item1 = var_Items1.Add("Popup 1",2,100); var_Item1.ShowPopupAlign = 1; var_Item1.ShowPopupArrow = false; var var_Items2 = var_Item1.Items; var_Items2.PopupAppearance = 3; var_Items2.Add("Item 1",null,null); var_Items2.Add("Item 2",null,null); var_Items2.Add("Item 3",null,null); var var_Item2 = var_Items1.Add("Popup 2",2,200); var_Item2.ShowPopupAt = 100; var_Item2.ShowPopupArrow = false; var var_Items3 = var_Item2.Items; var_Items3.PopupAppearance = 3; var_Items3.Add("Item 4",null,null); var_Items3.Add("Item 5",null,null); var_Items3.Add("Item 6",null,null); 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 With .Add("",2) .GroupPopup = 1 With .Items With .Add("Popup 1",2,100) .ShowPopupAlign = 1 .ShowPopupArrow = False With .Items .PopupAppearance = 3 .Add "Item 1" .Add "Item 2" .Add "Item 3" End With End With With .Add("Popup 2",2,200) .ShowPopupAt = 100 .ShowPopupArrow = False With .Items .PopupAppearance = 3 .Add "Item 4" .Add "Item 5" .Add "Item 6" End With End With End With End With End With .Refresh End With End Function </SCRIPT> </BODY>
C# for /COM
EXRIBBONLib.Items var_Items = axRibbon1.Items; EXRIBBONLib.Item var_Item = var_Items.Add("",2,null); var_Item.GroupPopup = EXRIBBONLib.GroupPopupEnum.exGroupPopup; EXRIBBONLib.Items var_Items1 = var_Item.Items; EXRIBBONLib.Item var_Item1 = var_Items1.Add("Popup 1",2,100); var_Item1.ShowPopupAlign = EXRIBBONLib.ShowPopupAlignEnum.exShowPopupAlignDown; var_Item1.ShowPopupArrow = false; EXRIBBONLib.Items var_Items2 = var_Item1.Items; var_Items2.PopupAppearance = EXRIBBONLib.AppearanceEnum.RaisedBorder; var_Items2.Add("Item 1",null,null); var_Items2.Add("Item 2",null,null); var_Items2.Add("Item 3",null,null); EXRIBBONLib.Item var_Item2 = var_Items1.Add("Popup 2",2,200); var_Item2.ShowPopupAt = 100; var_Item2.ShowPopupArrow = false; EXRIBBONLib.Items var_Items3 = var_Item2.Items; var_Items3.PopupAppearance = EXRIBBONLib.AppearanceEnum.RaisedBorder; var_Items3.Add("Item 4",null,null); var_Items3.Add("Item 5",null,null); var_Items3.Add("Item 6",null,null); axRibbon1.Refresh();
X++ (Dynamics Ax 2009)
public void init() { COM com_Item,com_Item1,com_Item2,com_Items,com_Items1,com_Items2,com_Items3; anytype var_Item,var_Item1,var_Item2,var_Items,var_Items1,var_Items2,var_Items3; ; super(); var_Items = exribbon1.Items(); com_Items = var_Items; var_Item = com_Items.Add("",COMVariant::createFromInt(2)); com_Item = var_Item; com_Item.GroupPopup(1/*exGroupPopup*/); var_Items1 = com_Item.Items(); com_Items1 = var_Items1; var_Item1 = com_Items1.Add("Popup 1",COMVariant::createFromInt(2),COMVariant::createFromInt(100)); com_Item1 = var_Item1; com_Item1.ShowPopupAlign(1/*exShowPopupAlignDown*/); com_Item1.ShowPopupArrow(false); var_Items2 = com_Item1.Items(); com_Items2 = var_Items2; com_Items2.PopupAppearance(3/*RaisedBorder*/); com_Items2.Add("Item 1"); com_Items2.Add("Item 2"); com_Items2.Add("Item 3"); var_Item2 = com_Items1.Add("Popup 2",COMVariant::createFromInt(2),COMVariant::createFromInt(200)); com_Item2 = var_Item2; com_Item2.ShowPopupAt(100); com_Item2.ShowPopupArrow(false); var_Items3 = com_Item2.Items(); com_Items3 = var_Items3; com_Items3.PopupAppearance(3/*RaisedBorder*/); com_Items3.Add("Item 4"); com_Items3.Add("Item 5"); com_Items3.Add("Item 6"); exribbon1.Refresh(); }
Delphi 8 (.NET only)
with AxRibbon1 do begin with Items do begin with Add('',TObject(2),Nil) do begin GroupPopup := EXRIBBONLib.GroupPopupEnum.exGroupPopup; with Items do begin with Add('Popup 1',TObject(2),TObject(100)) do begin ShowPopupAlign := EXRIBBONLib.ShowPopupAlignEnum.exShowPopupAlignDown; ShowPopupArrow := False; with Items do begin PopupAppearance := EXRIBBONLib.AppearanceEnum.RaisedBorder; Add('Item 1',Nil,Nil); Add('Item 2',Nil,Nil); Add('Item 3',Nil,Nil); end; end; with Add('Popup 2',TObject(2),TObject(200)) do begin ShowPopupAt := 100; ShowPopupArrow := False; with Items do begin PopupAppearance := EXRIBBONLib.AppearanceEnum.RaisedBorder; Add('Item 4',Nil,Nil); Add('Item 5',Nil,Nil); Add('Item 6',Nil,Nil); end; end; end; end; end; Refresh(); end
Delphi (standard)
with Ribbon1 do begin with Items do begin with Add('',OleVariant(2),Null) do begin GroupPopup := EXRIBBONLib_TLB.exGroupPopup; with Items do begin with Add('Popup 1',OleVariant(2),OleVariant(100)) do begin ShowPopupAlign := EXRIBBONLib_TLB.exShowPopupAlignDown; ShowPopupArrow := False; with Items do begin PopupAppearance := EXRIBBONLib_TLB.RaisedBorder; Add('Item 1',Null,Null); Add('Item 2',Null,Null); Add('Item 3',Null,Null); end; end; with Add('Popup 2',OleVariant(2),OleVariant(200)) do begin ShowPopupAt := 100; ShowPopupArrow := False; with Items do begin PopupAppearance := EXRIBBONLib_TLB.RaisedBorder; Add('Item 4',Null,Null); Add('Item 5',Null,Null); Add('Item 6',Null,Null); end; end; end; end; end; Refresh(); end
VFP
with thisform.Ribbon1 with .Items with .Add("",2) .GroupPopup = 1 with .Items with .Add("Popup 1",2,100) .ShowPopupAlign = 1 .ShowPopupArrow = .F. with .Items .PopupAppearance = 3 .Add("Item 1") .Add("Item 2") .Add("Item 3") endwith endwith with .Add("Popup 2",2,200) .ShowPopupAt = 100 .ShowPopupArrow = .F. with .Items .PopupAppearance = 3 .Add("Item 4") .Add("Item 5") .Add("Item 6") endwith endwith endwith endwith endwith .Refresh endwith
dBASE Plus
local oRibbon,var_Item,var_Item1,var_Item2,var_Items,var_Items1,var_Items2,var_Items3 oRibbon = form.Activex1.nativeObject var_Items = oRibbon.Items var_Item = var_Items.Add("",2) var_Item.GroupPopup = 1 var_Items1 = var_Item.Items var_Item1 = var_Items1.Add("Popup 1",2,100) var_Item1.ShowPopupAlign = 1 var_Item1.ShowPopupArrow = false var_Items2 = var_Item1.Items var_Items2.PopupAppearance = 3 var_Items2.Add("Item 1") var_Items2.Add("Item 2") var_Items2.Add("Item 3") var_Item2 = var_Items1.Add("Popup 2",2,200) var_Item2.ShowPopupAt = 100 var_Item2.ShowPopupArrow = false var_Items3 = var_Item2.Items var_Items3.PopupAppearance = 3 var_Items3.Add("Item 4") var_Items3.Add("Item 5") var_Items3.Add("Item 6") oRibbon.Refresh()
XBasic (Alpha Five)
Dim oRibbon as P Dim var_Item as P Dim var_Item1 as P Dim var_Item2 as P Dim var_Items as P Dim var_Items1 as P Dim var_Items2 as P Dim var_Items3 as P oRibbon = topparent:CONTROL_ACTIVEX1.activex var_Items = oRibbon.Items var_Item = var_Items.Add("",2) var_Item.GroupPopup = 1 var_Items1 = var_Item.Items var_Item1 = var_Items1.Add("Popup 1",2,100) var_Item1.ShowPopupAlign = 1 var_Item1.ShowPopupArrow = .f. var_Items2 = var_Item1.Items var_Items2.PopupAppearance = 3 var_Items2.Add("Item 1") var_Items2.Add("Item 2") var_Items2.Add("Item 3") var_Item2 = var_Items1.Add("Popup 2",2,200) var_Item2.ShowPopupAt = 100 var_Item2.ShowPopupArrow = .f. var_Items3 = var_Item2.Items var_Items3.PopupAppearance = 3 var_Items3.Add("Item 4") var_Items3.Add("Item 5") var_Items3.Add("Item 6") oRibbon.Refresh()
Visual Objects
local var_Item,var_Item1,var_Item2 as IItem local var_Items,var_Items1,var_Items2,var_Items3 as IItems var_Items := oDCOCX_Exontrol1:Items var_Item := var_Items:Add("",2,nil) var_Item:GroupPopup := exGroupPopup var_Items1 := var_Item:Items var_Item1 := var_Items1:Add("Popup 1",2,100) var_Item1:ShowPopupAlign := exShowPopupAlignDown var_Item1:ShowPopupArrow := false var_Items2 := var_Item1:Items var_Items2:PopupAppearance := RaisedBorder var_Items2:Add("Item 1",nil,nil) var_Items2:Add("Item 2",nil,nil) var_Items2:Add("Item 3",nil,nil) var_Item2 := var_Items1:Add("Popup 2",2,200) var_Item2:ShowPopupAt := 100 var_Item2:ShowPopupArrow := false var_Items3 := var_Item2:Items var_Items3:PopupAppearance := RaisedBorder var_Items3:Add("Item 4",nil,nil) var_Items3:Add("Item 5",nil,nil) var_Items3:Add("Item 6",nil,nil) oDCOCX_Exontrol1:Refresh()
PowerBuilder
OleObject oRibbon,var_Item,var_Item1,var_Item2,var_Items,var_Items1,var_Items2,var_Items3 oRibbon = ole_1.Object var_Items = oRibbon.Items var_Item = var_Items.Add("",2) var_Item.GroupPopup = 1 var_Items1 = var_Item.Items var_Item1 = var_Items1.Add("Popup 1",2,100) var_Item1.ShowPopupAlign = 1 var_Item1.ShowPopupArrow = false var_Items2 = var_Item1.Items var_Items2.PopupAppearance = 3 var_Items2.Add("Item 1") var_Items2.Add("Item 2") var_Items2.Add("Item 3") var_Item2 = var_Items1.Add("Popup 2",2,200) var_Item2.ShowPopupAt = 100 var_Item2.ShowPopupArrow = false var_Items3 = var_Item2.Items var_Items3.PopupAppearance = 3 var_Items3.Add("Item 4") var_Items3.Add("Item 5") var_Items3.Add("Item 6") 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 "" 2 Nothing to voItem Handle hoItem Get Create (RefClass(cComItem)) to hoItem Set pvComObject of hoItem to voItem Set ComGroupPopup of hoItem to OLEexGroupPopup Variant voItems1 Get ComItems of hoItem to voItems1 Handle hoItems1 Get Create (RefClass(cComItems)) to hoItems1 Set pvComObject of hoItems1 to voItems1 Variant voItem1 Get ComAdd of hoItems1 "Popup 1" 2 100 to voItem1 Handle hoItem1 Get Create (RefClass(cComItem)) to hoItem1 Set pvComObject of hoItem1 to voItem1 Set ComShowPopupAlign of hoItem1 to OLEexShowPopupAlignDown Set ComShowPopupArrow of hoItem1 to False Variant voItems2 Get ComItems of hoItem1 to voItems2 Handle hoItems2 Get Create (RefClass(cComItems)) to hoItems2 Set pvComObject of hoItems2 to voItems2 Set ComPopupAppearance of hoItems2 to OLERaisedBorder Get ComAdd of hoItems2 "Item 1" Nothing Nothing to Nothing Get ComAdd of hoItems2 "Item 2" Nothing Nothing to Nothing Get ComAdd of hoItems2 "Item 3" Nothing Nothing to Nothing Send Destroy to hoItems2 Send Destroy to hoItem1 Variant voItem2 Get ComAdd of hoItems1 "Popup 2" 2 200 to voItem2 Handle hoItem2 Get Create (RefClass(cComItem)) to hoItem2 Set pvComObject of hoItem2 to voItem2 Set ComShowPopupAt of hoItem2 to 100 Set ComShowPopupArrow of hoItem2 to False Variant voItems3 Get ComItems of hoItem2 to voItems3 Handle hoItems3 Get Create (RefClass(cComItems)) to hoItems3 Set pvComObject of hoItems3 to voItems3 Set ComPopupAppearance of hoItems3 to OLERaisedBorder Get ComAdd of hoItems3 "Item 4" Nothing Nothing to Nothing Get ComAdd of hoItems3 "Item 5" Nothing Nothing to Nothing Get ComAdd of hoItems3 "Item 6" Nothing Nothing to Nothing Send Destroy to hoItems3 Send Destroy to hoItem2 Send Destroy to hoItems1 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,oItem1,oItem2 LOCAL oItems,oItems1,oItems2,oItems3 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} ) oItems := oRibbon:Items() oItem := oItems:Add("",2) oItem:GroupPopup := 1/*exGroupPopup*/ oItems1 := oItem:Items() oItem1 := oItems1:Add("Popup 1",2,100) oItem1:ShowPopupAlign := 1/*exShowPopupAlignDown*/ oItem1:ShowPopupArrow := .F. oItems2 := oItem1:Items() oItems2:PopupAppearance := 3/*RaisedBorder*/ oItems2:Add("Item 1") oItems2:Add("Item 2") oItems2:Add("Item 3") oItem2 := oItems1:Add("Popup 2",2,200) oItem2:ShowPopupAt := 100 oItem2:ShowPopupArrow := .F. oItems3 := oItem2:Items() oItems3:PopupAppearance := 3/*RaisedBorder*/ oItems3:Add("Item 4") oItems3:Add("Item 5") oItems3:Add("Item 6") oRibbon:Refresh() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN