Home > Language Reference > Classes
Selector Class
+ Object
+ Display
+ UIComponent
+ Control
+ ActionControl
+ Selector
Description
The Selector class implements behaviors specific to selector controls. These controls are used in order to let the user choose a value in a dialog box. This class is not instantiable, derivable or cloneable. The only instances available to the programmer are those automatically generated by HB++ when you place a control on a form.

The Mode property, both available at design-time and runtime, allows you to define control behavior among the three following possibilities:
A date selector displays the date specified by the Date property using the format defined by the Format property. When the user taps onto the control, a system dialog box allowing a date to be chosen is displayed. The title of this dialog box can be defined by setting the DialogTitle property. When the user closes this box, a Change event is raised, the Date property reflecting then the new selection.

A time selector displays the time specified by the Time property using the format defined by the Format property. When the user taps onto the control, a system dialog box permitting a time to be chosen is displayed. The title of this dialog box can be defined by the DialogTitle property. When the user closes this box, a Change event is raised, the Time property then reflecting the new selection.

Finally, a user defined selector simply displays the text defined by its Text property, inherited from the ActionControl class. When the user clicks onto the control, a Click event is sent, that your program must intercept in order to open any appropriate dialog box. This kind of selector never raises any Change event.
If the width of the text in the selector is modified, it is resized, either to the left or right according to the AnchorLeft property.
Note: the PenMove event is not raised by this object but handled internally.
Members
| Members | Description |
| Change | Event raised when the user closes the date or time selection dialog box. |
| Date | Date displayed by the control. |
| DialogTitle | Title of the dialog box associated with the selector. |
| Format | Time or date display format. |
| Mode | Selector type |
| Time | Time displayed by the control. |
| Inherited from ActionControl | Description |
| Click | Raised when the user taps a control. |
| Font | Font used to display the control text. |
| Group | Group which the control belongs to. |
| HitControl | Simulates a tap on a control. |
| Text | Text displayed by the control. |
| Value | Control state. |
| Inherited from Control | Description |
| DrawFocusRing | Draws the focus ring. |
| GotFocus | Event raised when the control gains the focus. |
| Layer | Layer to which the control belongs. |
| LostFocus | Event raised when the control loses the focus. |
| NavFlags | Navigation flags for the control. |
| RemoveFocusRing | Erase the focus ring. |
| Tag | String associated with the control. |
| Visible | Indicates if a control is visible or not. |
| Inherited from UIComponent | Description |
| 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 Display | Description |
| 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 Object | Description |
| 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
| System | Minimal version | Remarks |
| Palm OS | Palm OS 3.0 | N/A |