Different button behaviour in ribbon tab and menu

526
3
05-04-2021 06:48 AM
GintautasKmieliauskas
Regular Contributor

Hi,

I have placed the same button to ribbon tab and menu for burger button.

If I change caption of button in different workflows, button in ribbon reacts to changes, but button in menu reacts only to enable/disable.

Is is possible to get the same button behaviour in menu?

0 Kudos
3 Replies
UmaHarano
Esri Regular Contributor

Hi

Can you please give me a little info on how you changed the caption in your workflows? Also, please let me know the Pro version you are using.

I tried a simple caption change in the ribbon button and it worked for me. The same button placed in the burger menu reflected the change.

Thanks

Uma

0 Kudos
GintautasKmieliauskas
Regular Contributor

Hi.

My ArcGIS Pro version 2.7.3

I have tried different ways:

1. Override OnUpdate

protected override void OnUpdate()
{
if (_isLogged)
{
Caption = "Sign out";
}
else
{
Caption = "Sign in";
}
}

2. On custom event

private void onAuth(AuthorizationDataMessage msg)
{
if (msg != null && !string.IsNullOrEmpty(msg.AccessToken))
{
Caption = "Sign out";
_isLogged = true;
}
else
{
Caption = "Sign in";
_isLogged = false;
}
}

 

3. Setting Plugin properties

var plugin = FrameworkApplication.GetPlugInWrapper("my_autorization_Btn");
plugin.Caption = "Sign out";

I have tried with Esri button "esri_editing_SaveEditsBtn" too. Behaviour was the same

0 Kudos
UmaHarano
Esri Regular Contributor

Hi,

Thank you for this information. I am now able to see the problem too. I will submit an issue for this bug and get back to you when I have updates on its resolution.

Thank you for reporting this one!

Uma

 

0 Kudos