Skip to content
Discussion options

You must be logged in to vote

There is a item-pointer-event callback in StandardListView which you can use for that: https://slint.dev/releases/1.5.1/docs/slint/src/language/widgets/standardlistview#callbacks

Example:

import { StandardListView } from "std-widgets.slint";
export component Example inherits Window {
    width: 150px;
    height: 150px;
    StandardListView {
        width: 150px;
        height: 150px;
        model: [ { text: "Blue"}, { text: "Red" }, { text: "Green" },
            { text: "Yellow" }, { text: "Black"}, { text: "White"},
            { text: "Magenta" }, { text: "Cyan" },
        ];
        item-pointer-event(i, ev) => {
            if ev.button == PointerEventButton.left && ev.kind == Po…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Dirleye
Comment options

Answer selected by Dirleye
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants