Is there a way to change the display order of a custom tab in an Outlook XML ribbon. I know it`s possible with the ribbon designer, but what about ribbons that are designed in xml.
Thanks
Use the "insertBeforeMso" or "insertAfterMso" attributes of the tab element.
<?xml version="1.0" encoding="UTF-8"?>
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="Ribbon_Load">
<ribbon>
<tabs>
<tab id="MyTab" visible="true" label="MyTab" insertBeforeMso="TabMail">
<group label="MyGroup" id="MyGroup" autoScale="true">
<button id="MyButton"
size="large"
label="Copy Excel Chart"
imageMso="HappyFace"
onAction="OnMyButtonClick"/>
</group>
</tab>
</tabs>
</ribbon>
</customUI>
Related
I'm using Xamarin.forms 5.0 and Shell.
My XAML code is
<TabBar Route="Root">
<Tab x:Name="NewsListPageTab" Title="News" Route="NewsListPage">
<Tab.Icon>
<FontImageSource FontFamily="{StaticResource FaRegular}" Glyph="{x:Static utils:FontAwesomeIcons.Newspaper}" />
</Tab.Icon>
<ShellContent ContentTemplate="{DataTemplate pages:NewsListPage}" Title="News1">
<ShellContent.Icon>
<FontImageSource
FontFamily="{StaticResource FaRegular}"
Glyph="{x:Static utils:FontAwesomeIcons.BadgePercent}">
</FontImageSource>
</ShellContent.Icon>
</ShellContent>
<ShellContent ContentTemplate="{DataTemplate pages:NewsListPage}" Title="News2">
<ShellContent.Icon>
<FontImageSource
FontFamily="{StaticResource FaRegular}"
Glyph="{x:Static utils:FontAwesomeIcons.BadgePercent}">
</FontImageSource>
</ShellContent.Icon>
</ShellContent>
</Tab>
</TabBar>
The overall appearance that I'm trying to create is like this image.
How is it possible to add icons to the inner tabs and make them full width in the app shell, please?
I found an easy solution: instead of using ShellContent for upper tabs, we can use TabbedPages with pages representing the tabs we need.
<Tab Title="ُShop" Route="CompaniesTabs">
<ShellContent ContentTemplate="{DataTemplate retailer:CompaniesTabs}" />
</Tab>
The TabbedPage code is as followed:
<?xml version="1.0" encoding="utf-8" ?>
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="Retailer.CompaniesTabs">
<retailer:CompaniesStatusPage Title="Store1" />
<retailer:CompaniesListPage Title="Store3" />
<retailer:CompaniesFavoritePage Title="Store3" />
</TabbedPage>
That's it.
I have create a Menu item under the Main menu however I want to create a submenu item like this image
I have used this xml tag in the plugin.xml for menu. I want to create a submenuitem like the red marking on the image.
<actions>
<!-- Add your actions here -->
<group id="MyPlugin.test" text="_" description="test">
<add-to-group group-id="MainMenu" anchor="last" />
<!--<action id="Myplugin.Textboxes" class="Mypackage.TextBoxes" text="Text _Boxes" description="A menu item" />
<action id="Myplugin.Dialogs" class="Mypackage.MyShowDialog" text="Show _Dialog" description="A menu item" />-->
<action id="testAndroidPlugin.MyAction" class="com.test.bijesh.MyActionClass" text="Create String"
description="The action implemented by MyActionClass class">
<!--<add-to-group group-id="MainMenu" anchor="after" relative-to-action="WindowMenu"/>-->
<keyboard-shortcut keymap="$default" first-keystroke="ctrl alt S"/>
</action>
<action id="testAndroidPlugin.ManageResources" class="com.test.bijesh.actions.ColorActions" text="Create Color"
description="The action implemented by ColorAction class">
<!--<add-to-group group-id="MainMenu" anchor="after" relative-to-action="WindowMenu"/>-->
<keyboard-shortcut keymap="$default" first-keystroke="ctrl alt C"/>
</action>
</group>
</actions>
Here's how we do it in Ceylon IDE:
<actions>
<group text="Ceylon" icon="/icons/ceylon.png" popup="true">
<action> ...</action>
<add-to-group group-id="ToolsMenu" anchor="last"/>
</group>
</actions>
This results in Tools > Ceylon > .... I think your version does not work because text="_" generates an empty text (_ is used for keyboard shortcuts).
A nested action:
<actions>
<group id="YourCompany.All" popup="true" class="com.company.CompanyActionGroup">
<add-to-group group-id="MainMenu" anchor="before" relative-to-action="HelpMenu"/>
</group>
<group id="YourCompany.All.Foo" popup="true" class="com.company.FooActionGroup">
<add-to-group group-id="YourCompany.All" anchor="first"/>
<action
id="some.action"
text="Do Action"
description="This will do the action."
class="com.yourcompany.FooAction"
icon="/icons/foo.svg"
/>
</group>
</actions>
This gives
Menu: A > B > Do Action
(Where the text for A & B are defined in the class's referenced).
In my USysRibbons table I have this RibbonXML below which have a labelControl that I would like to alter using the onload event "BAMPEAMain_onLoad"
When I open the database, MsAcces display the following message
...Cannot run the marco or callback function 'BAMPEAMain_onLoad.
Make sure the macro or function exists and takes the correct parameters.
What's wrong with the BAMPEAMain_onLoad
Public Sub BAMPEAMain_onLoad(ribbon As IRibbonUI)
'
' Code for onLoad callback. Ribbon control customUI
MsgBox "Hello " '& dhGetUserName 'use the record dhGetUserName function to get the current user logged ID.
.
.
.
RibbonXML
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="BAMPEAMain_onLoad">
<ribbon startFromScratch="true">
<tabs>
<tab idMso="TabFile" visible="false" />
<tab idMso="TabHome" visible="false" />
<tab idMso="TabCreate" visible="false" />
<tab idMso="TabExternalData" visible="false" />
<tab idMso="TabDatabaseTools" visible="false" />
<tab idMso="TabSourceControl" visible="false" />
<tab idMso="TabAddIns" visible="true" />
<tab id="BAMPEA" label="BAMPEA" visible="true">
<group id="Connect" label="Connect" visible="true">
<comboBox id="SelectSites" label="Sites" visible="true" onChange="SelectSites_onChange"/>
<comboBox id="SelectDB" label="Select DB" visible="true" onChange="SelectDB_onChange"/>
<labelControl id="CurrentUserId" label="Bonjour ! - " visible="true"/>
<button id="ExitApp" imageMso="ShapeLightningBolt" label="Exit" visible="true" onAction="ExitApp_onAction"/>
<button id="BAMPEAHelp" imageMso="WorkflowPending" visible="true" onAction="BAMPEAHelp_onAction"/>
</group ></tab >
</tabs>
</ribbon>
<backstage>
<tab idMso="TabInfo" visible="true"/>
<button idMso="FileSave" visible="false"/>
<button idMso="SaveObjectAs" visible="false"/>
<button idMso="FileSaveAsCurrentFileFormat" visible="false"/>
<button idMso="FileOpen" visible="false"/>
<button idMso="FileCloseDatabase" visible="false"/>
<tab idMso="TabRecent" visible="false"/>
<tab idMso="TabNew" visible="false"/>
<tab idMso="TabPrint" visible="false"/>
<tab idMso="TabShare" visible="false"/>
<tab id="customTab" label="Custom Tab"/>
<tab idMso="TabHelp" visible="false"/>
<button idMso="ApplicationOptionsDialog" visible="false"/>
<button idMso="FileExit" visible="false"/>
</backstage>
</customUI>
When MsAccess display the following message ...Cannot run the marco or callback function 'BAMPEAMain_onLoad. it's because MS access can't find the public sub BAMPEAMain_onLoad in your vba module or there is a typo in your module.
Problem fixed.
I'm trying to contribute a menu item to the Configure menu item/group in Project Explorer.
The following snippet adds my menu item to the same level. Adding <menu label="Configure" /> between <menuContribution ...> and <command ...> creates a duplicate Configure menu item.
What am I doing wrong?
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension point="org.eclipse.ui.menus">
<menuContribution locationURI="popup:org.eclipse.jdt.ui.PackageExplorer">
<command commandId="com.example.convert" label="Convert to XXX Project..." />
</menuContribution>
</extension>
<extension point="org.eclipse.ui.commands">
<command id="com.example.convert" defaultHandler="com.example.ConvertAction" name="Convert to XXX Project" />
</extension>
</plugin>
Using org.eclipse.ui.menus is the more future-safe way so I prefer that whenever I have a choice.
Set the locationURI to popup:org.eclipse.ui.projectConfigure
If you need to find the locationURI of any menu press Alt+Shift+F2, then open the menu as usual and click where you want to insert.
You should be using org.eclipse.ui.popupMenus extension point and adding an objectContribution.
Here's a simplified snippet in the plugin.xml that we are using inside of AJDT to contribute to the configure menu. You should be able to use something like this for your project.
<extension
point="org.eclipse.ui.popupMenus">
<objectContribution
objectClass="org.eclipse.core.resources.IProject"
adaptable="true"
id="iprojectcontributions">
<menu
label="%org.eclipse.ajdt.ui.tools"
id="org.eclipse.ajdt.ui.project.tools">
<separator
name="group0">
</separator>
</menu>
<visibility>
<and>
<objectState name="nature" value="org.eclipse.jdt.core.javanature"/>
<not>
<objectState name="nature" value="org.eclipse.ajdt.ui.ajnature"/>
</not>
<objectState name="open" value="true"/>
</and>
</visibility>
<action
label="%convertToAJP"
class="org.eclipse.ajdt.internal.ui.actions.AddAJNatureAction"
menubarPath="org.eclipse.ui.projectConfigure/additions"
id="addajnatureaction">
</action>
</objectContribution>
</extension>
I would like to add a gap between two buttons on an Eclipse toolbar. Both these buttons are defined in the plugin.xml for the plugin. I have tried specifying a separator, as per the following XML snippet, but nothing shows up.
<menuContribution locationURI="toolbar:com.bogus.viewId.MyView">
<command
commandId="com.bogus.filters.menu"
icon="icons/filter.gif"
label="Filter Menu"
style="pulldown"
tooltip="Filter Menu" />
</menuContribution>
<menuContribution locationURI="toolbar:com.bogus.viewId.MyView">
<separator name="com.bogus.separator1" />
</menuContribution>
<menuContribution locationURI="toolbar:com.bogus.viewId.MyView">
<command
commandId="com.bogus.commands.dangerous"
icon="icons/bomb.png"
label="BOOM!"
tooltip="BOOM!" />
</menuContribution>
As a side note, does anyone know where I can find a decent schema definition for the plugin.xml file? This is the best I could find so far, but its poor.
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/misc/plugin_manifest.html
So it turns out the separator element can have a 'visible' attribute and this must be set to true.
<separator name="com.bogus.separator1" visible="true" />
I found this out by random googling. Still couldn't find a decent schema definition for the plugin.xml.
Above thing is not work for me. Here is my code.
<menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar?after=additions">
<toolbar id="com.qas.testpage.toolbar">
<separator name="com.qas.separator1" visible="true">
</separator>
</toolbar>
</menuContribution>
<menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar?after=additions">
<toolbar id="com.qas.testpage.toolbar">
<command commandId="com.qas.javatestsuite" icon="icons/qas/testjavasuite.png" tooltip="Create New Java TestSuite Project" id="com.qas.toolbar" label="Java Test Suite Project">
</command>
</toolbar>
</menuContribution>