Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Ribbonbar dynamic menu
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Ribbonbar dynamic menu

 Post Reply Post Reply
Author
Message
ouatcha View Drop Down
Newbie
Newbie


Joined: 08 June 2010
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote ouatcha Quote  Post ReplyReply Direct Link To This Post Topic: Ribbonbar dynamic menu
    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
Back to Top
chrisABC View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 June 2008
Status: Offline
Points: 258
Post Options Post Options   Thanks (0) Thanks(0)   Quote chrisABC Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
ouatcha View Drop Down
Newbie
Newbie


Joined: 08 June 2010
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote ouatcha Quote  Post ReplyReply Direct Link To This Post Posted: 10 June 2010 at 3:49am
It works !
Thanks a lot ChrisABC !
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.219 seconds.