Spread Windows Forms 10.0 Product Documentation
Enabled Property (PSObject)
Example 


Gets or sets whether the object can receive focus and respond to user actions.
Syntax
'Declaration
 
Public Overrides Property Enabled As Boolean
'Usage
 
Dim instance As PSObject
Dim value As Boolean
 
instance.Enabled = value
 
value = instance.Enabled
public override bool Enabled {get; set;}

Property Value

Boolean: true if the object can receive focus and respond to user actions; false otherwise
Remarks
This property is available at run time only.
Example
This example shows the use of the property in customizing a shape to illustrate the use of the property for classes that inherit this property.
System.Drawing.Point[] pts = {new System.Drawing.Point(25, 0), 
                                new System.Drawing.Point(0, 50), 
                                new System.Drawing.Point(20, 50), 
                                new System.Drawing.Point((int)2.5, 100), 
                                new System.Drawing.Point(40, 40), 
                                new System.Drawing.Point(20, 40), 
                                new System.Drawing.Point(40, 0), 
                                new System.Drawing.Point(25, 0)};

System.Drawing.Drawing2D.GraphicsPath gpath = new System.Drawing.Drawing2D.GraphicsPath();
gpath.AddPolygon(pts);

FarPoint.Win.Spread.DrawingSpace.PSObject pso = new FarPoint.Win.Spread.DrawingSpace.CustomShape();
pso.BackColor = Color.Black;
pso.AlphaBlendBackColor = 90;
pso.Enabled = true;
pso.CanMove = FarPoint.Win.Spread.DrawingSpace.Moving.HorizontalAndVertical;
pso.CanRotate = true;
pso.CanSize = FarPoint.Win.Spread.DrawingSpace.Sizing.HeightAndWidth;
pso.Shape = gpath;
pso.SetBounds(250, 250, 120, 120);
fpSpread1.ActiveSheet.AddShape((FarPoint.Win.Spread.DrawingSpace.PSShape)pso);
Dim pts As System.Drawing.Point() = {New System.Drawing.Point(25, 0),  _
                                New System.Drawing.Point(0, 50),  _
                                New System.Drawing.Point(20, 50),  _
                                New System.Drawing.Point(2.5, 100),  _
                                New System.Drawing.Point(40, 40),  _
                                New System.Drawing.Point(20, 40),  _
                                New System.Drawing.Point(40, 0),  _
                                New System.Drawing.Point(25, 0)}

Dim gpath As System.Drawing.Drawing2D.GraphicsPath = New System.Drawing.Drawing2D.GraphicsPath
gpath.AddPolygon(pts)

Dim pso As New FarPoint.Win.Spread.DrawingSpace.CustomShape
pso.BackColor = Color.Black
pso.AlphaBlendBackColor = 90
pso.Enabled = True
pso.CanMove = FarPoint.Win.Spread.DrawingSpace.Moving.HorizontalAndVertical
pso.CanRotate = True
pso.CanSize = FarPoint.Win.Spread.DrawingSpace.Sizing.HeightAndWidth
pso.Shape = gpath
pso.SetBounds(250, 250, 120, 120)
FpSpread1.ActiveSheet.AddShape(pso)
Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows Server 2012 R2, Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10

See Also

Reference

PSObject Class
PSObject Members

 

 


Copyright © GrapeCity, inc. All rights reserved.