MS Access ribbon onload - vba

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.

Related

MAUI flyout is duplicating as buttons at the bottom of the screen

I'm developing my first MAUI app. I've googled this, and cannot find out how to get rid of it.
I have two Tabs defined in my AppShell Flyout. They show up in the flyout itself fine, and work beautifully, just as expected. But then they ALSO duplicate as buttons at the bottom of the screen, pointed to by the blue arrows in the screenshot below.
Here's the full XAML for my AppShell:
<Shell
x:Class="OurApp.AppShell"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:OurApp"
Shell.FlyoutBehavior="Flyout" Shell.NavBarIsVisible="False">
<FlyoutItem FlyoutDisplayOptions="AsMultipleItems">
<Tab Title="Application" Route="application">
<ShellContent Title="Login" Route="login" ContentTemplate="{DataTemplate local:Login}" />
<ShellContent Title="About" Route="about" ContentTemplate="{DataTemplate local:About}" />
<ShellContent Title="Exit" Route="exit" ContentTemplate="{DataTemplate local:Exit}" />
</Tab>
<Tab x:Name="ModulesTab" Title="Modules" Route="modules">
<ShellContent Title="Receiving" Route="receiving" ContentTemplate="{DataTemplate local:Receiving}" />
<ShellContent Title="Shipping" Route="shipping" ContentTemplate="{DataTemplate local:Shipping}" />
<ShellContent Title="Putaway" Route="putaway" ContentTemplate="{DataTemplate local:Putaway}" />
</Tab>
</FlyoutItem>
</Shell>
How do I hide those buttons at the bottom, while keeping the actual Flyout visible?
I tried doing this in my XAML:
<Shell ... Shell.NavBarIsVisible="False">
But that hides both the buttons AND the flyout! I want to get rid of the buttons but keep the flyout. I don't need it duplicated like that.
Or if there's a way to hide the flyout but keep the buttons, that would work too, though I'd prefer keeping the flyout. Ultimately, I just want to eliminate the duplication.
You could try using TabBarIsVisible property of shell:
<Shell
x:Class="GoodSam.MATTRAK.AppShell"
....
Shell.TabBarIsVisible="False">
(you can also add Shell.TabBarIsVisible="False" to the shell content).
For more info, you could refer to TabBar and Tab visibility
Hope it works for you.
The suggestion in comments by #ToolmakerSteve worked. I thought the FlyoutItem element was a root, and could only occur once. However breaking the tabs out into separate FlyoutItems solved it.
Updated the flyouts to be defined as so:
<FlyoutItem FlyoutDisplayOptions="AsMultipleItems">
<Tab Title="Application" Route="application">
<ShellContent Title="Login" Route="login" ContentTemplate="{DataTemplate pages:LoginPage}" />
<ShellContent Title="About" Route="about" ContentTemplate="{DataTemplate pages:AboutPage}" />
<ShellContent Title="Exit" Route="exit" ContentTemplate="{DataTemplate pages:ExitPage}" />
</Tab>
</FlyoutItem>
<FlyoutItem FlyoutDisplayOptions="AsMultipleItems" >
<Tab x:Name="ModulesTab" Title="Modules" Route="modules" IsVisible="False">
<ShellContent Title="Receiving" Route="receiving" ContentTemplate="{DataTemplate pages:InventoryReceivingPage}" />
<ShellContent Title="Physical" Route="physical" ContentTemplate="{DataTemplate pages:InventoryPhysicalPage}" />
</Tab>
</FlyoutItem>
<FlyoutItem FlyoutDisplayOptions="AsMultipleItems" >
<Tab x:Name="DataTab" Title="Data" Route="data" IsVisible="False">
<ShellContent Title="Drop Downs" Route="dropdowns" ContentTemplate="{DataTemplate pages:DropdownsDataPage}" />
</Tab>
</FlyoutItem>
Which then gave me the separate tabs (Log Out is a MenuItem under the flyoutitems)...
without any extraneous buttons at the bottom of the screen...

How to set shell upper tabs to take full width

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.

How to create sub menuitem in intellij plugin

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).

Documenting with doxygen: put details on top

I'm using doxygen for a documentation of an Android project. I know doxygen since years. But now I have the problem that I want the details of my class like in javadoc at the top and not at the bottom.
After a short Google search I found the option DETAILS_AT_TOP which would just do what I want but unfortunately this option was removed. So the new method is to use a so called DoxygenLayout.xml, but where is the documentation how that file should look like? In the documentation are only some attributes explained. Where is the original DoxygenLayout.xml which I can modify as I need it?
I had also the same problem with the HTML_FOOTER it is not documented how the original file looks like.
After doing some more research with the command line options I found this:
4) Use doxygen to generate a template file controlling the layout of
the generated documentation:
doxygen -l layoutFileName.xml
So I got my DoxygenLayout.xml with doxygen -l. I just modyfied the order of the details and deactivated the brief version:
<doxygenlayout version="1.0">
<!-- Generated by doxygen 1.8.5 -->
<!-- Navigation index tabs for HTML output -->
<navindex>
<tab type="mainpage" visible="yes" title=""/>
<tab type="pages" visible="yes" title="" intro=""/>
<tab type="modules" visible="yes" title="" intro=""/>
<tab type="namespaces" visible="yes" title="">
<tab type="namespacelist" visible="yes" title="" intro=""/>
<tab type="namespacemembers" visible="yes" title="" intro=""/>
</tab>
<tab type="classes" visible="yes" title="">
<tab type="classlist" visible="yes" title="" intro=""/>
<tab type="classindex" visible="$ALPHABETICAL_INDEX" title=""/>
<tab type="hierarchy" visible="yes" title="" intro=""/>
<tab type="classmembers" visible="yes" title="" intro=""/>
</tab>
<tab type="files" visible="yes" title="">
<tab type="filelist" visible="yes" title="" intro=""/>
<tab type="globals" visible="yes" title="" intro=""/>
</tab>
<tab type="examples" visible="yes" title="" intro=""/>
</navindex>
<!-- Layout definition for a class page -->
<class>
<briefdescription visible="no"/>
<detaileddescription title=""/>
<includes visible="$SHOW_INCLUDE_FILES"/>
<inheritancegraph visible="$CLASS_GRAPH"/>
<collaborationgraph visible="$COLLABORATION_GRAPH"/>
<memberdecl>
<nestedclasses visible="yes" title=""/>
<publictypes title=""/>
<services title=""/>
<interfaces title=""/>
<publicslots title=""/>
<signals title=""/>
<publicmethods title=""/>
<publicstaticmethods title=""/>
<publicattributes title=""/>
<publicstaticattributes title=""/>
<protectedtypes title=""/>
<protectedslots title=""/>
<protectedmethods title=""/>
<protectedstaticmethods title=""/>
<protectedattributes title=""/>
<protectedstaticattributes title=""/>
<packagetypes title=""/>
<packagemethods title=""/>
<packagestaticmethods title=""/>
<packageattributes title=""/>
<packagestaticattributes title=""/>
<properties title=""/>
<events title=""/>
<privatetypes title=""/>
<privateslots title=""/>
<privatemethods title=""/>
<privatestaticmethods title=""/>
<privateattributes title=""/>
<privatestaticattributes title=""/>
<friends title=""/>
<related title="" subtitle=""/>
<membergroups visible="yes"/>
</memberdecl>
<memberdef>
<inlineclasses title=""/>
<typedefs title=""/>
<enums title=""/>
<services title=""/>
<interfaces title=""/>
<constructors title=""/>
<functions title=""/>
<related title=""/>
<variables title=""/>
<properties title=""/>
<events title=""/>
</memberdef>
<allmemberslink visible="yes"/>
<usedfiles visible="$SHOW_USED_FILES"/>
<authorsection visible="yes"/>
</class>
<!-- Layout definition for a namespace page -->
<namespace>
<briefdescription visible="no"/>
<detaileddescription title=""/>
<memberdecl>
<nestednamespaces visible="yes" title=""/>
<constantgroups visible="yes" title=""/>
<classes visible="yes" title=""/>
<typedefs title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
<membergroups visible="yes"/>
</memberdecl>
<memberdef>
<inlineclasses title=""/>
<typedefs title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
</memberdef>
<authorsection visible="yes"/>
</namespace>
<!-- Layout definition for a file page -->
<file>
<briefdescription visible="no"/>
<detaileddescription title=""/>
<includes visible="$SHOW_INCLUDE_FILES"/>
<includegraph visible="$INCLUDE_GRAPH"/>
<includedbygraph visible="$INCLUDED_BY_GRAPH"/>
<sourcelink visible="yes"/>
<memberdecl>
<classes visible="yes" title=""/>
<namespaces visible="yes" title=""/>
<constantgroups visible="yes" title=""/>
<defines title=""/>
<typedefs title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
<membergroups visible="yes"/>
</memberdecl>
<memberdef>
<inlineclasses title=""/>
<defines title=""/>
<typedefs title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
</memberdef>
<authorsection/>
</file>
<!-- Layout definition for a group page -->
<group>
<briefdescription visible="no"/>
<detaileddescription title=""/>
<groupgraph visible="$GROUP_GRAPHS"/>
<memberdecl>
<nestedgroups visible="yes" title=""/>
<dirs visible="yes" title=""/>
<files visible="yes" title=""/>
<namespaces visible="yes" title=""/>
<classes visible="yes" title=""/>
<defines title=""/>
<typedefs title=""/>
<enums title=""/>
<enumvalues title=""/>
<functions title=""/>
<variables title=""/>
<signals title=""/>
<publicslots title=""/>
<protectedslots title=""/>
<privateslots title=""/>
<events title=""/>
<properties title=""/>
<friends title=""/>
<membergroups visible="yes"/>
</memberdecl>
<memberdef>
<pagedocs/>
<inlineclasses title=""/>
<defines title=""/>
<typedefs title=""/>
<enums title=""/>
<enumvalues title=""/>
<functions title=""/>
<variables title=""/>
<signals title=""/>
<publicslots title=""/>
<protectedslots title=""/>
<privateslots title=""/>
<events title=""/>
<properties title=""/>
<friends title=""/>
</memberdef>
<authorsection visible="yes"/>
</group>
<!-- Layout definition for a directory page -->
<directory>
<briefdescription visible="no"/>
<detaileddescription title=""/>
<directorygraph visible="yes"/>
<memberdecl>
<dirs visible="yes"/>
<files visible="yes"/>
</memberdecl>
</directory>
</doxygenlayout>
After a short review of the output I desiced to remove the headline with this small css:
a + h2.groupheader {
display:none;
}
For HTML_FOOTER (and header & CSS) there is a similar command to generate a local copy of the default Doxygen HTML. You can then use the HTML_* doxyfile settings to point to them.
doxygen -w html header.html footer.html customdoxygen.css
Details for this are on this page of the online manual.

Changing display order in Outlook xml ribbon tabs

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>