1. kostas karanasos
  2. PowerBuilder
  3. Sunday, 3 October 2021 21:19 PM UTC

Hi

Does anyone can tell me how can I make a RibbonMenuItem control invisible at runtime ?

 

Thanks a lot

 

Kostas

René Ullrich Accepted Answer Pending Moderation
  1. Monday, 4 October 2021 06:26 AM UTC
  2. PowerBuilder
  3. # 1

Hi Kostas,

You have to get the RibbonMenuItem, change the visible property and then Set the changed Item.

Here an short example that uses GetItemByTag to get the item. You may also use different ways.

RibbonMenuItem lrmi_Item

IF rbb_menu.GetItemByTag ("TheTagOfTheItemYouWantToGet", lrmi_Item) = 1 THEN
	lrmi_Item.Visible = FALSE
	rbb_menu.SetItem (lrmi_Item)
END IF
Comment
  1. kostas karanasos
  2. Monday, 4 October 2021 06:41 AM UTC
Hi René



You can't use the GetItemByTag function with RibbonMenuItem. Returns -1

It is a little bit more tricky to make a RibbonMenuItem invisible

Pau Haro has the solution here

https://community.appeon.com/index.php/qna/q-a/getting-ribbonmenuitem-issues



Thanks a lot



Kostas



  1. Helpful
  1. René Ullrich
  2. Monday, 4 October 2021 06:53 AM UTC
Ok. RibbonMenuItem is also used for the application menu (RibbonApplicationMenu). In this case it works with GetItemByTag.

As Pau shows the items of RibbonMenu seems not to be accessible from RibbonBar but only from parent RibbonMenu.

  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.