Print Page | Close Window

Ribbonbar dynamic menu

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=16805
Printed Date: 23 November 2024 at 6:56pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Ribbonbar dynamic menu
Posted By: ouatcha
Subject: Ribbonbar dynamic menu
Date Posted: 08 June 2010 at 10:54am
Sorry for my english.
 
I want that my ribbonbar refreshes dynamicaly :
for example, an item must be enabled or disabled according to a property of my appli. If the value of the property changes, I want that my item becomes disabled automatically ( like my old menu : Define Bar ... Skip For ...), I have tried 'Enabled', but it is not dynamic...
 
Thanks in advance



Replies:
Posted By: chrisABC
Date Posted: 09 June 2010 at 5:12am
You just need to put some code in the CommandBars_Update event.

Look at the Sample Ribbon example that comes with the controls.

For example
    
     Select Case Control.ID
        Case  ID_BUTTON1:  Control.Checked = bMyVariable1
        Case ID_BUTTON2:  Control.enabled = Button2ShouldBeEnabled


This event occurs every fraction of a second automatically, and is the place to change Buttons as your program progresses.




-------------
Chris (Manchester, UK) -- www.abc6.co.uk ---- Using CodeJock ActiveX Suite 13.1.0 with Windows8, VB6 SP6


Posted By: ouatcha
Date Posted: 10 June 2010 at 3:49am
It works !
Thanks a lot ChrisABC !



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net