FocusTouchArea

FocusTouchArea is like the default TouchArea with builtin focus management and an included FocusBorder.

Properties

  • focus_border_radius (in length): Defines the border radius of the focus border (default 0).
  • focus_pressed (out bool): Is true if touch area is pressed by mouse or if it has focus and enter is pressed.
  • has_focus: (out bool): Set to true when the button has keyboard focus.

Callbacks

  • clicked()

Example

import { FocusTouchArea } from "@coop/lib.slint";

export component MyFocusWidget {
    width: 200px;
    height: 25px;

   FocusTouchArea {
        clicked => {
            debug("clicked");
        }
   }
}