How to change name in Ribbon

Hello,

I have created different tabs in Ribbon Bar.
If I want to hide Ribbon Bar Its works well with :
SetUIProp(“Ribbon1scToolPager1”, “Visible”, “FALSE”);

But what about to change the name of a tab, using SetUIProp is it possible ?
I have tried addind tab name as follow :
The name of the tab is : scToolPagerPage1.
So I use the following :
SetUiProp(“Ribbon1scToolPager1scToolPagerPage1”, “Caption”,“text”);

But it is not working, any idea ?

Thank-you
Gilbert

And does this work?
SetUiProp(“Ribbon1scToolPagerPage1”, “Caption”,“text”);

I have allready tryed that way, and it doesn’t work to!

We’ll try to see what is wrong.

Ok, thank-you !

Hello,

It is still not working with last version !

???

Gilbert

Actually, the necessary code was introduced in V2019 and explained in the doc:
https://www.exeoutput.com/help/ribbon#how-to-change-the-name-of-a-ribbon-page-at-runtime

I have tryed :

SetUIProp(“ribbon1scToolPager1”, “Tabs.items[0].Caption”, “test”);
SetUIProp(“ribbon1scToolPager1”, “Tabs.scToolPagerPage[0].Caption”, “test”);

Both give me an error :

Unknown identifier or variable is not declared: ‘test’, Source position: 2,67

Try
SetUIProp("ribbon1scToolPager1", "Tabs.items[0].Caption", """My new caption""");

1 Like

Yes, it is working now :

For thoses who need to use it with

exo_return_hescriptcom

It is working that way :

exo_return_hescriptcom (‘MainUser.Name-of-Your-Procedure|“text for caption”’, ‘’)

Thank-you, I realy need that option for my customers

Pretty cool! Is there way to do this with javascript? Something like:

exeoutput.RunHEScriptCom('hescript://UserMain.RibbonTest|'"Santa Clause"', '');

Using this in scripting:

procedure RibbonTest;         
begin
 SetUIProp("ribbon1scToolPager1", "Tabs.items[0].Caption", """My New Caption""");             
end; 

Getting error in dev console “Uncaught SyntaxError: missing ) after argument list”.

Yes, my fault, it is :

exeoutput.RunHEScriptCom (‘UserMain.RibbonTest|“Santa Clause”’, ‘’);

…and not :

exeoutput.RunHEScriptCom (‘UserMain.RibbonTest|’“Santa Clause”', ‘’);

An example in javascript :

function executecom()

{

return exeoutput.RunHEScriptCom(‘UserMain.RibbonTest|“Santa Clause”’);

}

…and then:

a href =“javascript:executecom()”>Click here</a

2 Likes

Thanks @Gilmichel !

I changed and works, but does not change the tab to text in:

function executecom()
{
return exeoutput.RunHEScriptCom('UserMain.RibbonTest|"Santa Clause"');
}

When using example a href, it uses text from:

procedure RibbonTest;         
begin
 SetUIProp("ribbon1scToolPager1", "Tabs.items[0].Caption", """My New Caption""");             
end; 

Nevertheless, appreciate the input that got me headed in right direction.

EDIT: All good, working fine, had issue in my SetUIProp string.

function executecom()
{
return exeoutput.RunHEScriptCom(‘UserMain.RibbonTest|“Santa Clause”’);
}

It is not for the tab text, it is for the javascript calling procedure.

Happy that it has helped you,