How do you force a XUL tree to scroll in code?

I have an app written in XUL which contains a custom tree view that has many items. I've got a button that allows the selected item to be removed but my problem is that whenever this button is pressed, the tree gets scrolled all the way to the top. I have tried to fix this by re-selecting the item at the old index, but unfortunately this does not scroll the view. Is there a way I can get the tree view to either not scroll to the top or force it to re-scroll back to the original position? My code looks something like this: onRemoveNilSelection: function(event) { var selectedIndex = this._tree.currentIndex; this._treeView.removeItem(selectedIndex); this._tree.view = this._treeView;; },

以上就是How do you force a XUL tree to scroll in code?的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准