def is_selected(self, element):

        key = self._get_key(element)

        if key in self._element_to_id_map:
            is_selected = self.control.IsSelected(self._element_to_id_map[key])

        else:
            is_selected = False

        return is_selected
Returns True if the element is selected, otherwise False.
dataset/ETHPy150Open enthought/pyface/pyface/viewer/tree_viewer.py/TreeViewer.is_selected