SideBar responds to a number of keystrokes and mouse gestures at runtime. This section describes the runtime behaviour of SideBar. When SideBar has focus, a focus rectangle is drawn around the currently active element. An active element can be either a button in the button stack or on the footer, the expand/collapse button or the menu button. It is possible to suppress the display of the focus rectangle by setting the ShowFocus property false. When SideBar has focus it will respond to keystrokes. The table below details how SideBar responds to keystrokes and mouse gestures.
| Key press / Mouse gesture |
Operation |
| UP or LEFT key. |
Move focus to the previous SideBar element. If the expand/collapse button already has focus then no action is taken. |
| DOWN or RIGHT key. |
Move focus to the next SideBar element. If the menu button already has focus then no action is taken. |
| ENTER key or SPACE bar |
If the expand/collapse button has the focus then the SideBar Collapsed property is toggled. If a SideBar button has the input focus then the action performed is the same as the action that occurs when the user clicks the SideBar button. The SideBar ItemSelected and BarItem Click events are also raised. |
| CANCEL key |
If a child control of one of the SideBar internal panels has the input focus, then the SideBar receives the focus. |
| LEFT CLICK |
If the click occurs on the expand/collapse button then the SideBar Collapsed property is toggled. If the click occurs on a SideBar button then the button receives focus and the SideBar ItemSelected and BarItem Click events raised. The InternalPanel associated with the SideBar button is made visible. If the SideBar button has an ExternalControl then it is also made visible. |
| RIGHT CLICK |
If the SideBar has a ContextMenuStrip then it is displayed. |
| DRAG |
Drag and drop a SideBar button from its current location to a new one. During the drag operation, a drop location indicator is displayed. |
Note that if the Form has an AcceptButton then pressing the ENTER key when any control has focus has the same effect as clicking the AcceptButton. This does not apply to SideBar. If SideBar has focus then pressing the ENTER key does not have the same effect as clicking on the AcceptButton and the SideBar behaves as described in the table above. Similarly if the Form has a CancelButton then pressing the ESCAPE key when any control has focus has the same effect as clicking the CancelButton. This does not apply to SideBar. If SideBar has focus then pressing the ESCAPE key does not have the same effect as clicking on the CancelButton and the SideBar behaves as described in the table above. |
|