Home > Language Reference > Classes

UIComponent Class

  + Object
    + Display
      + UIComponent

Description

The UIComponent class implements the behaviours common to all objects making up the user interface. This class is not instantiable, derivable, nor cloneable. The features it offers are only accessible through its predefined derived classes.

The Left and Top properties return the coordinates of the top left corner of a component whilst the Width and Height properties return its size. These properties are read-only. To move an element, you should use the Move method. The coordinates are expressed in standard coordinates with respect to the top left corner of the form containing the component or the top left corner of the screen if the component is a form.

When the component has a border, like a modal form or a button, it is drawn outside the component. The diagram below shows on a PushButton control the values returned by the Left, Top, Width and Height properties :

The ComponentToScreen and ScreenToComponent allow conversion of coordinates relative to components into coordinates relative to the screen, and vice versa. The combination of these two functions is often used to convert coordinates relative to one component into coordinates relative to another component.

The PenDown, PenMove and PenUp events are raised respectively when the user presses down, moves, or releases the stylus on the component. The coordinates are expressed in standard coordinates with respect to the top left corner of the element. The component onto which the user places the stylus captures the events until the stylus is lifted. Thus the PenMove and PenUp events continue to be raised even if it moves outside the area of the component.

Members

MembersDescription
ComponentToScreen Converts coordinates relative to a component into coordinates relative to the screen.
FiveWayNavigator Event raised when the user presses one of the 5-way navigator keys.
Height Element height.
Left Distance between the left edge of the form and the left edge of the element.
Move Moves or resizes an element.
PenDown Event raised when the user touches an UI element with the stylus.
PenMove Event raised when the user moves the stylus.
PenUp Event raised when the user releases the stylus.
ScreenToComponent Converts coordinates relative to the screen into coordinates relative a component.
Top Distance between the top edge of the form and the top edge of the element.
UIRef Internal reference to a control.
Width Element width.
Inherited from DisplayDescription
Arc Draws an arc.
BackColor Background color.
BatchLimit Size of the graphics instruction buffer.
CoordinateSystem Coordinates system.
CopyArea Efficiently copies part of a Display object to another.
DrawFont Font used to draw the text.
Flush Empties the graphics instruction buffer.
FontMetrics Returns a FontMetrics object describing the physical charateristics of the currently active font.
ForeColor Foreground color.
GetPixel Queries the color of a given pixel.
hWin Returns the window handle.
Line Draws a line.
Oval Draws a circle or ellipse.
Pattern Defines the pattern used to fill drawings.
Polygon Draws a polygon.
PutPixel Sets the color of a pixel.
Rectangle Draw a rectangle.
ResID Identifier of the resource associated with the object.
ScaleFont Enable or disable font scaling.
TextColor Text color.
TextOut Draw text.
Inherited from ObjectDescription
ClassID Returns the type identifier corresponding to the actual class of the object.
Implements Determines whether the object implements the features of a given class.
Iterate Event raised to iterate over the elements of a container object.
Recipient Recipient of events sent by the object.
Serialize Event raised to serialize the object content into a stream.

System requirements

SystemMinimal versionRemarks
Palm OSPalm OS 3.0N/A