ButtonBar responds to a number of keystrokes and mouse gestures at runtime. This section describes the runtime behaviour of ButtonBar. When ButtonBar has focus, a focus rectangle is drawn around the Text of the currently active ButtonBarButton or the overflow menu indicator. If the ButtonBarButton has no Text then the focus rectangle is drawn around the ButtonBarButton Image. When a ButtonBar has focus it will respond to keystrokes. It is possible to suppress the display of the focus rectangle by setting the ShowFocus property false.
The table below details how ButtonBar responds to keystrokes and mouse gestures.
| Key press / Mouse gesture | Operation |
|---|---|
| UP or LEFT key. | Move focus to the previous ButtonBar element. If the first ButtonBarButton already has focus then no action is taken. |
| DOWN or RIGHT key. | Move focus to the next ButtonBar item. If the last element already has focus then no action is taken. |
| ENTER key or SPACE bar | If one of the ButtonBarButton items has the focus then the ButtonBar ItemSelected and BarItem Click events are raised. If a sub button has focus then the ButtonBar SubItemSelected and ButtonBarButton SubButtonClick events are raised. If the overflow menu indicator is the current element then the overflow menu is displayed. |
| LEFT CLICK | If the click occurs on a ButtonBarButton then the item receives focus and the ButtonBar ItemSelected and BarItem Click events raised. If the click occurs on a sub button, then the sub button receives focus and the ButtonBar SubItemSelected and ButtonBarButton SubButtonClick events are raised. If the click occurs on the overflow menu indicator, then the overflow menu is displayed. |
| RIGHT CLICK | If the ButtonBar has a |
| DRAG | Drag and drop a ButtonBarButton or ButtonBarSeparator from its current location to a new one. During the drag operation, a drop location indicator is displayed. If the ButtonBarButton has a Menu then it is displayed when the ButtonBarButton is clicked preventing the drag operation from commencing. If this is the case then hold down the CONTROL key when clicking on the ButtonBarButton to prevent the Menu from being shown. Similarly if one of the click event handlers have been implemented then the implementation may prevent the drag from commencing. Once again hold down the CONTROL key to prevent the event handler from executing. |
Note that if the |
|
Note that if the