BCGControlBar Library for .NET
CommandPanel Class
Members 




Inherits from Control class of Windows.Forms namespace. Used to group collections of command buttons. Serves as a base class for the CommandBar class.

The buttons are located on the CommandWithEvent collection which we can get an access by the property ItemCollection to. The class contains some properties related to the location, size, appearance and selection  of the command buttons.
Method AdjustLayout allows to rearrange buttons on the command panel according to its size and the size and location of its buttons. User can get a pointer to ICommandObject interface  by methods ObjectFromID and ObjectFromPoint.
CommandPanel
class has some event handlers related to mouse events,  changing the state and size of the command object, in which the appearance of the command object can be changed and any events can be raised.
Object Model
CommandPanel ClassICommandObject InterfaceICommandObject InterfaceICommandObject InterfaceCollectionWithEvents ClassObject ClassCommandButton ClassICommandObject InterfaceCommandButton Class
Syntax
'Declaration
 
Public Class CommandPanel 
   Inherits System.Windows.Forms.Control
   Implements IToolTipInfoProvider 
'Usage
 
Dim instance As CommandPanel
public class CommandPanel : System.Windows.Forms.Control, IToolTipInfoProvider  
public __gc class CommandPanel : public System.Windows.Forms.Control, IToolTipInfoProvider  
public ref class CommandPanel : public System.Windows.Forms.Control, IToolTipInfoProvider  
Remarks

One of the important abilities of CommandPanel is the ability to work in "component mode". In this mode the control becomes invisible, but receives mouse input from its parent. The bounds of items (elements of ItemCollection) are set relatively to the parent client area. This allows easy creation of transparent controls. For example, if we want to create a track bar control and put it on a toolbar, we just put a track bar in component mode and embed it into toolbar button.

To put a control into component mode set its ParentContainer property.

Inheritance Hierarchy

System.Object
   System.MarshalByRefObject
      System.ComponentModel.Component
         System.Windows.Forms.Control
            BCGSoft.Controls.Shared.CommandPanel
               BCGSoft.ControlBars.CommandBar
               BCGSoft.ControlBars.GalleryControl
               BCGSoft.Controls.BackstageView.BackstagePinPanel
               BCGSoft.Controls.BackstageView.BackstageTabControl
               BCGSoft.Controls.OutlookBar.OutlookBarPane
               BCGSoft.Controls.OutlookBar.OutlookMenuBar
               BCGSoft.Controls.OutlookBar.OutlookToolBar
               BCGSoft.Controls.Shared.ColorPanel
               BCGSoft.Controls.Shared.ProgressBarControl
               BCGSoft.Controls.Shared.TrackBarEx
               BCGSoft.Controls.TabStrip.TabStripCommandPanel
               BCGSoft.Controls.TasksPane.TasksPanePage
               BCGSoft.Controls.TasksPane.TasksPaneToolBar
               BCGSoft.Controls.Toolbox.ToolboxControl

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

CommandPanel Members
BCGSoft.Controls.Shared Namespace

Send Feedback