setEventListener

open override fun <T : Widget> setEventListener(block: SnOn<T>.() -> Unit): Int

Sets an event listener for current widget, keeping the actual type of component.

Return

id of the handler

Example:

button.setEventListener

Parameters

T

widget type

block

event handler