March 2003
Intermediate to advanced
896 pages
32h 35m
English
ComponentTray
This Control implements the component tray portion
of the forms designer.
You can retrieve the number of components in the tray using the
ComponentCount property. The icons can be
automatically lined up using the AutoArrange
property, and their appearance can be modified with
ShowLargeIcons. The position of an individual icon
can be set using SetLocation().
The components themselves can be added using
CreateComponentFromTool() and removed using
RemoveComponent().
public class ComponentTray : System.Windows.Forms.ScrollableControl : System.ComponentModel.IExtenderProvider, ISelectionUIHandler, IOleDragClient { // Public Constructors public ComponentTray(System.ComponentModel.Design.IDesigner mainDesigner, IServiceProvider serviceProvider); // Public Instance Properties public bool AutoArrange{set; get; } public int ComponentCount{get; } public bool ShowLargeIcons{set; get; } // Public Instance Methods public virtual void AddComponent(System.ComponentModel.IComponent component); public void CreateComponentFromTool(System.Drawing.Design.ToolboxItem tool); public Point GetLocation(System.ComponentModel.IComponent receiver); public virtual void RemoveComponent(System.ComponentModel.IComponent component); public void SetLocation(System.ComponentModel.IComponent receiver, System.Drawing.Point location); // Protected Instance Methods protected virtual bool CanCreateComponentFromTool(System.Drawing.Design.ToolboxItem tool); protected virtual bool CanDisplayComponent ...
Read now
Unlock full access