For future reference, if you want help with code, please post the code, not a picture of it.
Assume I have a ribbon bar with a drop down large button as follows:
<Panel Text="Default Command" Tag="Default Command">
<LargeButton Tag="DefaultCommandDemo" PictureName="ControlDropDownListBox!" Text="Demo" DefaultCommand="false" PowerTipText="Default Command Demo" PowerTipDescription="Demonstrates how the Default Command option makes a drop down button">
<Menu>
<Item Text="Item 1" PictureName="Custom001a!" Clicked="ue_defaultcommand1">
</Item>
<Item Text="Item 2" PictureName="Custom002a!" Clicked="ue_defaultcommand2">
</Item>
<Item Text="Item 3" PictureName="Custom003a!" Clicked="ue_defaultcommand3">
</Item>
</Menu>
</LargeButton>
</Panel>
Then I can add a fourth item by accessing the large button through it's tag value, grabbing the menu off of that and adding an item.
integer li_rc
PowerObject po
RibbonLargeButtonItem item
RibbonMenu menu
li_rc = rbb_1.GetItemByTag( 'DefaultCommandDemo', po )
IF li_rc < 0 THEN Return
item = po
li_rc = item.getmenu( menu)
li_rc = menu.Insertitemlast( '4th Item', 'Custom017a!', 'ue_someevent')
li_rc = item.setmenu( menu)
li_rc = rbb_1.setlargebutton( item.itemhandle, item )
The part that is going to throw most long term PowerBuilder developers is that inserting the item on the menu isn't going to make it appear in the toolbar. What we're getting from the Get methods on the toolbar isn't a *reference* to an item, it's a *copy* of it. Once you make your changes you need to use the Set methods to apply the changes back to the ribbonbar.