Enable / Disable custom ribbon buttons (1 Viewer)

humpydumpy

New member
Local time
Today, 11:47
Joined
Jul 9, 2016
Messages
9
Buenos dias a todos! I need some advice regarding how to implement custom ribbon. My problem is I have this ribbon:



What I would like to do is when I open the database only btn01 is enabled.
When I click btn01 it will open a form = frmMain
Upon opening frmMain, it has control buttons that when I click will trigger to enable other ribbon buttons.

Ex. When I click cmd02 it will enable btn02 but will disable btn01, btn03 etc

How am I able to achieve this? any suggestions? thanks in advance
 

theDBguy

I’m here to help
Staff member
Local time
Today, 11:47
Joined
Oct 29, 2018
Messages
21,454
Hi. You could add the getEnabled callback to your ribbon XML and in your command button clicks, you could execute the InvalidateControl method against the ribbon. Let me see if I can post a link in a sec...


Edit: Here's a link to the getEnabled calllback.
 

humpydumpy

New member
Local time
Today, 11:47
Joined
Jul 9, 2016
Messages
9
Thanks, but here I am still confused and can't figure it out. When I open a form (frmFormattedText) there is a checkbox that when I tick it will activate disabled buttons and disable completely the formatted text button. Any thoughts?
 

Attachments

  • custom_ribbon.zip
    47.4 KB · Views: 158

June7

AWF VIP
Local time
Today, 10:47
Joined
Mar 9, 2014
Messages
5,466
I don't think you can get what you want by clicking a checkbox or other control on a form. Personally, I would have buttons on form open other forms and I would have code behind form set enable/disable or visible/not visible for buttons.
 

Users who are viewing this thread

Top Bottom