Skip to content

Update - cCJCommandBarSystem

Sent by the idle timer to update the state of the commandbar system's menu items

Type: Procedure

Syntax

Procedure Update

Call Example

Send Update

Description

The Update procedure is used to update all "active" menu and toolbar item actions and the statusbar. It does this by sending the event OnUpdate to itself, by sending OnUpdate to all active toolbar and menu items, and by sending OnUpdate to the statusbar.. This is used to dynamically update the state (e.g., enabled state, checked state) of items and statusbar panes.

If the pbTimerUpdate property is true, this message is sent automatically by a built-in idle timer. This is expected usage. You can also send this message yourself if you wish to force an update of your items.

Only active menu/toolbar items receive the OnUpdate event. An item is made active by setting the item's pbActiveUpdate property to true.

Normally you will not directly use this message. You will use it indirectly by setting pbTimerUpdate to true, setting an item's pbActiveUpdate property to true and then adding code to the item's OnUpdate event. See OnUpdate for an example of this.

The Item Update Process

The Update method does not directly send OnUpdate to all active items. It sends the message Update to each active item object, which in turn sends itself the OnUpdate event. The item's Update method is also sent before any popup menu is displayed and it is called before an item's OnExecute event is called.