Skip to content

How to highlight list item on mouse-over? #804

Answered by gsalunke
gsalunke asked this question in Q&A
Discussion options

You must be logged in to vote

Below is the solution for this in ftd:


-- bar:

-- component bar:
integer $active-cell: -1

-- ftd.column:

-- foo: $obj
idx: $LOOP.COUNTER
$active: $bar.active-cell
$loop$: $names as $obj

-- end: ftd.column

-- end: bar


-- component foo:
caption name:
integer idx:
integer $active:

-- ftd.text: $foo.name
$on-mouse-enter$: $ftd.set-integer($a = $foo.active, v = $foo.idx)
$on-mouse-leave$: $ftd.set-integer($a = $foo.active, v = -1)
background.solid if { foo.active == foo.idx }: yellow

-- end: foo

Replies: 1 comment 1 reply

Comment options

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

Answer selected by gsalunke
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