Add SelectedNode method

This commit is contained in:
Igor German 2019-06-10 16:09:26 +03:00
parent 7357ed4649
commit 81435f79b5
1 changed files with 7 additions and 0 deletions

View File

@ -173,6 +173,13 @@ func (self *Tree) ScrollAmount(amount int) {
}
}
func (self *Tree) SelectedNode() *TreeNode {
if len(self.rows) == 0 {
return nil
}
return self.rows[self.SelectedRow]
}
func (self *Tree) ScrollUp() {
self.ScrollAmount(-1)
}