Vcl.Direct2D.TDirect2DCanvas.DrawFocusRect
Delphi
procedure DrawFocusRect(const Rect: TRect); override; // Doesn't have a concept of XOR brushes/pens
C++
virtual void __fastcall DrawFocusRect(const System::Types::TRect &Rect);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | Vcl.Direct2D.pas Vcl.Direct2D.hpp |
Vcl.Direct2D | TDirect2DCanvas |
Description
Draws a rectangle in the style used to indicate that the object inside the rectangle has focus.
Call DrawFocusRect for the perimeter of a control's image when the control gets or loses input focus. Because DrawFocusRect uses an XOR function, calling it a second time while specifying the same rectangle removes the rectangle from the screen.
The rectangle drawn by this function cannot be scrolled. To scroll an area containing a rectangle drawn by DrawFocusRect, call DrawFocusRect to remove the rectangle from the screen, scroll the area, and then call DrawFocusRect to draw the rectangle in the new position.
Warning: DrawFocusRect raises an exception. TDirect2DCanvas does not support the DrawFocusRect operation.