Drawable

Object List Hierarchy Next Object

Definition:

The base object for objects that can be drawn to. Drawable itself should not be used as a control, instead one of the objects that inherit from it should be used. The objects that inherit from Drawable are: Image, PictureBox, and MarkupLayer.

Any object that is copied from a drawable object can be used to display output from graphics methods and can have text written to it by using the Print method.

Specialized Features:

The following tables list and describe the properties, methods, and events added by Drawable:


Properties Use to...


BevelInner Determine how the inner border is drawn.

BevelOuter Determine how the outer border is drawn.

BevelWidth Define the size of the bevel style for both BevelInner and BevelOuter.

BorderWidth Define the space between the two bevels.

Current X, Specify the horizontal coordinate of printing and drawing methods. This value can be set to affect the next output method, or can be used after the method completes to determine the extent of the output method.

Current Y Specify the vertical coordinate of printing and drawing methods. This value can be set to affect the next output method, or can be used after the method completes to determine the extent of the output method.

DrawColor Control the line color of drawing methods that use a pen.

DrawMode Control how drawing operations affect drawable objects.

DrawStyle Control the line style of drawing methods that use a pen.

DrawWidth Control the line thickness of drawing methods that use a pen.

FillColor Determine the color used to fill the inside of items that are drawn using a brush.

FillStyle Determine the pattern used to fill the inside area of items drawn using a brush.

hDC Represent the Device Context (DC) that is used to draw the Drawable. This can be used when using Windows GDI functions.

Outlined Include a black border line around the outside of the object.


Methods Use to...


Arc Draw an elliptical arc using the current pen.

AngleArc Draw a line segment and an arc.

Chord Draw a Chord.

Cls Clear the screen.

Ellipse Draw an ellipse or circle.

LineTo Draw a line from CurrentX, CurrentY to user- specified coordinates.

MoveTo Set CurrentX, CurrentY to specific coordinates.

Pie Draw a v-shaped wedge.

PolyBezier Draw a Bezier curve using supplied coordinate arrays.

Polygon Draw a series of lines using supplied coordinate arrays. The last line is implied and is drawn to the start point.

Polyline Draw a series of lines using supplied coordinate arrays.

Rectangle Draw a rectangle using the given coordinates.

RoundRect Draw a rectangle with rounded corners using the given coordinates.

SetBrush Set how the shape is filled by configuring from a Brush.

SetPen Configure what the shape will look like when it is drawn, by setting the color and width from a Pen.

TextOut Draw the specified text at the current point, in the current font.


Events Use to...


Click Perform an action when the user presses and releases a mouse button while on an object, or when the value of a control is changed in code.

DblClick Perform an action when the user presses and releases a mouse button twice in rapid succession over an object.

GotFocus Define what occurs when an object is given the focus.

KeyDown Define what occurs when the user presses a key while an object has the focus.

KeyPress Define what occurs when the user presses and releases an ANSI key.

KeyUp Define what occurs when the user releases a key while an object has the focus.

LostFocus Define what occurs when an object loses the focus.

Paint Run an interpretive method when repainting is necessary. Also use for interpretive code to execute, to repaint the control

Copied Features:

images/Phx00136.gif Properties images/Phx00137.gif Methods images/Phx00138.gif Events

See Also:
Image, Picturebox, MarkupLayer