I recently created an AddIn to make the lives of my co-workers easier, and to make it as easy as possible for them I made a custom UI to add a tab and buttons for the macros. It works great and everyone is mostly happy. A problem has cropped up on some of their computers where the quick access tool bar gets reset every time they open Excel. Mine also reset the first time, but it's held on to changes I've made since. Other's gets reset every time they open it and I can't figure out why. I built my customUI from scratch and did not use any third party software to do it.
There isn't any code within the AddIn that affects the UI, the only code I put in was a Case statement to run specific macros for specific buttons. Below is my custom UI xml file. Anyone have any ideas why the quick access toolbar keeps resetting?
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
<ribbon>
<tabs>
<tab id = "CRC" label = "CRC Macros" insertAfterMso = "TabHome">
<group id = "MPS" label = "Schedule">
<button id = "KTC_button" label = "KTC MPS" image = "ktc_icon" size = "large" onAction = "ProcessRibbon"/>
<button id = "KTS_button" label = "KTS MPS" image = "kts_icon" size = "large" onAction = "ProcessRibbon"/>
<button id = "KTV_button" label = "KTV MPS" image = "ktv_icon" size = "large" onAction = "ProcessRibbon"/>
<button id = "split_button" label = "Split Schedule" image = "split_icon" size = "large" onAction = "ProcessRibbon"/>
</group>
<group id = "CTB" label = "Shortage Reports">
<button id = "QD_button" label = "Quick CTB" image = "qd_icon" size = "large" onAction = "ProcessRibbon"/>
<button id = "PL_button" label = "Product Line or CSV" image = "pl_icon" size = "large" onAction = "ProcessRibbon"/>
</group>
<group id = "OTH" label = "Other">
<button id = "STG_button" label = "Shipments-To-Go" image = "stg_icon" size = "large" onAction = "ProcessRibbon"/>
<button id = "peg_button" label = "Format Pegged" image = "peg_icon" size = "large" onAction = "ProcessRibbon"/>
<button id = "MRP_button" label = "MRP Summary" image = "MRP_icon" size = "large" onAction = "ProcessRibbon"/>
<button id = "MPS_Sum_button" label = "MPS Summary" image = "MPS_Sum_icon" size = "large" onAction = "ProcessRibbon"/>
</group>
</tab>
</tabs>
</ribbon>
</customUI>
Your ribbon XML markup looks good. It cannot be related to resetting the QAT in Office applications (Excel in your case) from the first sight.
First of all, you need to check out the list of Office add-ins. There can be any conflicts between extensions and your customizations.
Second, make sure there are no UI errors in Excel. By default, if an add-in (or any other kind of ribbon customizations) attempts to manipulate the Microsoft Office user interface (UI) and fails, no error message is displayed. However, you can configure Microsoft Office applications to display messages for errors that relate to the UI. You can use these messages to help determine why a custom ribbon does not appear, or why a ribbon appears but no controls appear. See How to: Show Add-in user interface errors for more information.
Third, it is not clear what your callbacks do. But ribbon is a static thing from its birth, so QAT can't be customized at runtime without loading a custom ribbon XML. So, only users or add-ins could do resets.
Related
I create an Entry on Xamarin.Forms using the following code
Entry txtMeasures = new Entry { WidthRequest = 100, Text = "32", TextColor = Color.Black };
The text that should appear is "32" but the entry appears empty on UWP app until I click the entry,
this happen only on Windows, on Mac, Android, iOs, the entry shows the text normally since it appears.
Entry Before Clicking
Entry After Clicking
I add Entry by code behind, but I don't have any issue in Android and UWP.
Firstly, set current cpntentpage stacklayout name as stacklayout1.
<StackLayout x:Name="stacklayout1">
<!-- Place new controls here -->
<Label Text="Welcome to Xamarin.Forms!"
HorizontalOptions="Center"
VerticalOptions="CenterAndExpand" />
</StackLayout>
Then add Entry in Stacklayout.
Entry txtMeasures = new Entry { WidthRequest = 100, Text = "32", TextColor = Color.Black };
stacklayout1.Children.Add(txtMeasures);
Seems to be a known issue with Entries on UWP:
Text is not visible on Entry element after animation finished #8503
Entry text initially invisible on UWP #8787
Fix 8503, 8787 - text in Entry not immediately visible, or visible after IsVisible set to true #8536
There are a couple of work arounds (set request height on the entry or where its wrapped in a scrollview have that wrap a ContentPresenter). I'm having this issue related to a scrollView but can't get either workaround to work 🤷♂️
I added a redirection link to the reference numbers in a grid that link back to receipts. I followed the instructions given in T200 to perform the task, except
I made the page that opens a popup instead of a new tab. It works for the first reference number I click, but after that it doesn't change the record. Instead the popup displays the record for the first reference number I clicked. Here is my code:
protected void RefNbrReceipt()
{
INRegister row = Receipts.Current;
INReceiptEntry graph = PXGraph.CreateInstance<INReceiptEntry>();
graph.receipt.Current = graph.receipt.Search<INRegister.refNbr>(row.RefNbr);
if (graph.receipt.Current != null)
{
throw new PXPopupRedirectException(graph, "Receipt Details");
}
}
I checked and made sure that the row updates to the selected value (I do have SyncPosition = true on the grid) as well as after the Search that graph.receipt.Current.RefNbr = row.RefNbr. All of the objects in the code when debugging and stepping through it are set to the correct values they should be. Even though these values are showing correctly, when the popup appears, it still has the incorrect record (the first record fetched).
Are you sure Current is set correctly?
If not make sure you use DependOnGrid:
<px:PXDSCallbackCommand Name="RefNbrReceipt" Visible="False" DependOnGrid="grid" CommitChanges="True" /></CallbackCommands>
You can also try setting CurrentDocument and Current cache record before opening the graph:
INRegister inRegister = graph.receipt.Search<INRegister.refNbr>(row.RefNbr);
graph.receipt.CurrentDocument.Current = inRegister;
graph.Caches[typeof(INRegister)].Current = inRegister;
In some scenario with popup windows, you need to issue a refresh command with AutoCallBack-Command and AutoCallBack-Target attributes, you can do that with grid and form containers:
<px:PXSmartPanel ID="pnlActivityLog" runat="server" Width="800px" Height="400px" Style="z-index: 108;" Caption="Activity log" CaptionVisible="True"
Key="ActivityLogs" CommandSourceID="ds" CreateOnDemand="False" AutoCallBack-Command="Refresh" AutoCallBack-Target="gridActivityLog">
<px:PXGrid ID="gridActivityLog" runat="server" Height="200px" Width="100%" BatchUpdate="True" SkinID="Inquire" DataSourceID="ds">
</px:PXPanel>
</px:PXSmartPanel>
I had the same issue PXPopupRedirectException
To solve this I used PXRedirectRequiredException like this:
throw new PXRedirectRequiredException(graph, "Subcontract", true) { Mode = PXBaseRedirectException.WindowMode.NewWindow };
This opens up a new browser window and repaints the controls of the calling window.
This is necessary if you have child grids that are depending on the row you click - and if the use 'changes rows' by clicking directly on the link.
I am using the Zxing.Net.Mobile package within my Windows 10 universal app. I use the Default overlay, which is quite nice in my eyes. Now I want to add Flash/Torch funtionality to my application. I only found Solutions defining a new customn overlay. Is it not possible to activate a Torch button in the default overlay? I found a scanner.FlashButtonText Definition, so i think a flashbutton should somehow be activatable and i just dont know the Name of this Parameter. Can someone help me with this? Thanks.
my Code Looks like this:
var options = new MobileBarcodeScanningOptions
{
AutoRotate = false,
TryHarder = true,
PossibleFormats = new List<ZXing.BarcodeFormat>
{
ZXing.BarcodeFormat.EAN_8, ZXing.BarcodeFormat.EAN_13, ZXing.BarcodeFormat.UPC_A, ZXing.BarcodeFormat.UPC_E
}
};
var scanner = new MobileBarcodeScanner(this.Dispatcher);
scanner.UseCustomOverlay = false;
scanner.RootFrame = MyFrame;
scanner.TopText = "Halte die Kamera vor den Barcode";
scanner.BottomText = "Die Kamera scannt den Barcode automatisch";
scanner.FlashButtonText = "activate Torch";
var result = await scanner.Scan(options);
Although MobileBarcodeScanner has a FlashButtonText property, but according to ZXing.Net.Mobile's source code, Flash/Torch function is not supported in the default overlay by now.
The default overlay is set by ZXingScannerControl and if we look at its source code, we will find it does have a button named "buttonToggleFlash". However this button is invisible and there is no property can control its visibility.
source code:
<Border Grid.Row="0" Visibility="Collapsed" VerticalAlignment="Top" HorizontalAlignment="Right" Width="120" Height="80">
<Button x:Name="buttonToggleFlash" Click="buttonToggleFlash_Click">Flash</Button>
</Border>
So to support Flash/Torch function, you need a customn overlay. Or you can edit the source code and rebuild ZXing.Net.Mobile for your purpose.
UITestControl uiLinkAboutus = new UITestControl(_bw);
uiLinkAboutus.TechnologyName = "Web";
uiLinkAboutus.SearchProperties.Add("ControlType", "Image");
uiLinkAboutus.SearchProperties.Add("TagName", "IMG");
uiLinkAboutus.SearchProperties.Add("Alt", "Open Menu");
Mouse.Click(uiLinkAboutus);
/* Upon execution, the drop down button is clicked but the option listed below is not clicked. How to solve this problem?
In stead of searching for an image, search for the list or dropdown control using a wpfCombobox, winCombobox or HtmlComboBox control. There you set the selectedItem property to the value you want. that is the most robust way of selecting an item in the UI. so e.g. :
ApplicationUnderTest aut = ApplicationUnderTest.Launch(#"yourapp.exe");
WpfComboBox cbBox = new WpfComboBox(aut);
cbBox.SearchProperties.Add(WpfComboBox.PropertyNames.AutomationId,"cmbCountries");//AutomationId == xName roperty
cbBox.SelectedItem = "your value";
I have a radgrid inside the edit form.I am binding the radgrid on the itemdatabound.
int id= Convert.ToInt32(editForm.GetDataKeyValue("ID").ToString());
RadGrid SummaryGrid = (RadGrid)item.FindControl("SummaryGrid");
SummaryGrid.DataSource = spObj.Sp_GetProjectDetails(id);
SummaryGrid.Visible = true;
SummaryGrid.Enabled = true;
SummaryGrid.DataBind();
The problem is I am able to edit only the last row in the grid.I m able to see the data binding to the inner grid for the last row.For all other rows I get the below error.
"There was a problem extracting DataKeyValues from the DataSource. Please ensure that DataKeyNames are specified correctly and all fields specified exist in the DataSource."
My grid inside edit:
<telerik:RadGrid ID="SummaryGrid" runat="server" AllowPaging="True" PageSize="50" AutoGenerateColumns="true" Visible="true"
AllowMultiRowSelection="true" AllowSorting="true" Skin="Hay" Width ="500px" >
<MasterTableView DataKeyNames="ProjectID" CommandItemDisplay="Top" TableLayout="Fixed" Caption ="Position-Specific Network + Activity Code Totals" Font-Bold="true" Font-Size="Small" Font-Names ="Ericsson Capital TT" >
<PagerStyle Mode="NumericPages" Position="Top"></PagerStyle>
<CommandItemSettings ShowAddNewRecordButton="false"/>
</MasterTableView></telerik:RadGrid>
</telerik:RadAjaxPanel>
This issue is blocking the development.can some one suggest any help on this?Any help/ideas highly appreciated.
Thanks
int id= Convert.ToInt32(editForm.GetDataKeyValue("ID").ToString());
This should be using ProjectID instead of ID. ID is not a data key that you've specified in your MasterTableView.