[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'InterfaceBase' (#lcl)

# TWidgetSet.ShowCaret

Shows the Caret (text cursor).

## Declaration

Source position: winapih.inc line 272

`public function TWidgetSet.ShowCaret(`
`hWnd: HWND`
`):Boolean; virtual;`

## Arguments

`hWnd` |  | The window handle.

## Function result

False on failure.

## Description

ShowCaret is a Boolean function used to display the caret or text cursor for the window handle specified in hWnd. The return value is True if the caret was successfully displayed in the method.

ShowCaret is a virtual method, and should be overridden in a descendent class to use the platform-specific mechanism(s) for the widgetset. The return value is always False in TWidgetSet.

Use HideCaret to remove the caret from the screen.

Use CreateCaret to create a new caret shape width the required size.

## See also

TWidgetSet.HideCaret |  | Removes the caret from the screen.