RibbonEditBox Instance

Add-in Express™ Support Service
That's what is more important than anything else

RibbonEditBox Instance
Enable Specific RibbonEditBox Text for each word document 
Subscribe
yoni




Posts: 3
Joined: 2017-09-13
Hello,

I added a RibbonEditBox to the Ribbon bar
When opening more the one document text that I put in the RibbonEditBox of one document appears on all opened windows..
I need to give the user the option to put different texts in the RibbonEditBox for each document instance..

How do I do that?

Thanks,
Yoni
Posted 13 Sep, 2017 09:21:06 Top
Andrei Smolin


Add-in Express team


Posts: 14138
Joined: 2006-05-11
Hello Yoni,

Please check section "Updating ribbon controls at run time" at https://www.add-in-express.com/docs/net-ribbon-components.php#properties-events. Does it answer your question?

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 13 Sep, 2017 10:45:43 Top
yoni




Posts: 3
Joined: 2017-09-13
Sorry but not, it did not solved the problem

I build a rib on bar with two RibbonEditBox and a save button
When user clicks the save button the document saves into our ERP program, the two RibbonEditBox texts save into the document record in our ERP

The problem is if user opens two different documents, goes to one of them and fill in the RibbonEditBox info of doc #1, the two RibbonEditBox the in doc #2 instance gets the same values..
Posted 17 Sep, 2017 02:46:16 Top
Andrei Smolin


Add-in Express team


Posts: 14138
Joined: 2006-05-11
Hello Yoni,

That section describes that you get this situation because there are two schemes that Add-in Express uses to update Ribbon controls: you get two controls having the same value because this is how the simple schema works. To achieve what you need, you need to use the other schema, the one that uses the OnPropertyChanging event.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 18 Sep, 2017 03:09:32 Top
yoni




Posts: 3
Joined: 2017-09-13
Thanks,
Can you please refer me to an example?
I was not able to find it in the documentation
Posted 18 Sep, 2017 03:41:44 Top
Andrei Smolin


Add-in Express team


Posts: 14138
Joined: 2006-05-11
Yoni,

I'm afraid we don't have an example.

That section contains a sample code. In your case, you need to check this condition: "whether the control is located in document#1 or document#2". How to find this is described in section Determining a ribbon control's context on the same page.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 18 Sep, 2017 04:02:23 Top