1. Christopher Craft
  2. PowerBuilder
  3. Sunday, 31 January 2021 18:47 PM UTC

I have a Tab Button item which has a drop down list of opened windows.  Each new window that opens will have its own Category (ie. Tab). This category has a Panel with a Small Button drop down.  I need this Small Button to share the data from the Tab Button drop down because as other windows are opened this list needs to have the latest entries across all the Categories.

I was hoping I could create an instance variable of RibbonMenu and then assign that variable as the menu to the SmallButton. Then I would just add the entry to the instance variable and all the buttons that use it will get the updated data but that does not work.  It seems for every new window that is opened I will need to add the menu item, insert that into the menu, set the menu and then set the item for the menu...and this needs to be done for every small button for every tab that is open.

I also tried to see if I could trigger an event when the user clicks on the button but since I need this button to be a Default Command of false the event will not trigger.

Is there a better way?  ShareData?

Thank you

Chris Craft

Accepted Answer
Mark Lee @Appeon Accepted Answer Pending Moderation
  1. Monday, 1 February 2021 09:37 AM UTC
  2. PowerBuilder
  3. # Permalink

 

Hi Chris,

 

Another suggestion is that:

1. Use the GetItemByTag method to find the Ribbonbar A control ' s specify Smallbutton quickly.
2. And then gain the RibbonMenu C object via GetMenu.
3. Use the SetMenu method to reset the RibbonMenu of the Smallbutton object specifies by Ribbonbar B control to RibbonMenu C.
https://docs.appeon.com/pb2019r3/powerscript_reference/ch02s04s274.html

https://docs.appeon.com/pb2019r3/objects_and_controls/ch02s101.html

 

Ribbonbar doesn't have the ShareData method. It only has methods like ExportXML and ImportXML.

https://docs.appeon.com/pb2019r3/objects_and_controls/ch02s90.html

 

Regards,

Comment
There are no comments made yet.


There are replies in this question but you are not allowed to view the replies from this question.