Eplan Platform API
Eplan.EplApi.Gui Namespace / RibbonBar Class
Members Example

In This Topic
    RibbonBar Class
    In This Topic
    Represents ribbon bar control.
    Inheritance Hierarchy

    System.Object
       Eplan.EplApi.Gui.RibbonBar

    Syntax
    public class RibbonBar 
    public ref class RibbonBar 
    Remarks
    The RibbonBar represents the whole ribbon bar control. All elements belonging to it are accessible through RibbonBar class. They are represented by classes RibbonTab, RibbonCommandGroup and RibbonCommand. For more information, please refer to "Ribbon bar" chapter of API Help or "The New Ribbon" chapter of Eplan Platform Help.
    Example
    Example below shows how to avoid GUI flickering and make sure that RibbonBar will be refreshed just after the add operations are completed. Parameter refreshAfterChanges=true means that refresh will be executed only once on RibbonBar destructor, in this case at the end of using() statement. This technique can be used also for removing elements from RibbonBar.
    using (var ribbonBar = new RibbonBar(true))
    {
        var ribbonTab = ribbonBar.AddTab("MyTab1") ?? ribbonBar.GetTab("MyTab1");
        var commandGroup = ribbonTab.AddCommandGroup("MyExampleActions");
        commandGroup.AddCommand("MyExampleAction1", "ExampleAction /PARAM:1");
        commandGroup.AddCommand("MyExampleAction2", "ExampleAction /PARAM:2");
        commandGroup.AddCommand("MyExampleAction3", "ExampleAction /PARAM:3");
    }
    
    
    Example of adding a command to the last position of the ribbon
    RibbonBar ribbonBar = new RibbonBar();
    ribbonBar.AddCommand("New ribbon button text", "XPartsManagementStart", new RibbonIcon(CommandIcon.Circle_0));
    Example of adding a tab, command group and a command
    var newTab = new Eplan.EplApi.Gui.RibbonBar().AddTab("New API tab");
    var commandGroup = newTab.AddCommandGroup("New API command group");
    var command = commandGroup.AddCommand("New API command", "XPartsManagementStart");
    Public Constructors
     NameDescription
    Public ConstructorOverloaded.   
    Top
    Public Properties
     NameDescription
    Public PropertyReturns active tab  
    Public PropertyReturns icons of the ribbon bar  
    Public PropertyReturns tabs of the ribbon bar  
    Top
    Public Methods
     NameDescription
    Public MethodOverloaded. Adds command to the ribbon  
    Public MethodCalls an action object on the ribbon. If the ribbon doesn't exist yet, the action will be executed after the system start is finished  
    Public MethodAdds new icon to the ribbon bar  
    Public MethodOverloaded. Adds a new tab to the ribbon  
    Public MethodDestructor for deterministic finalization of MainRibbon object.  
    Public MethodReturns default tab  
    Public MethodOverloaded. Returns tab by name, multilanguage  
    Public MethodOverloaded. Adds a command to the ribbon. If the ribbon doesn't exist yet, the command will be added after the system start is finished  
    Public MethodRemoves command from Extensions->API group  
    Public MethodRemoves custom icon from the ribbon bar  
    Public MethodOverloaded. Removes a command from the ribbon. If the ribbon doesn't exist yet, the command will be removed after the system start is finished  
    Top
    See Also