I want to scroll a DataViewCtrl
programmatically to the top. Is it possible to do this? I am aware of the discussion at:
DataViewCtrl: how to scroll programmatically? (wxGTK) but my model is not a PyDataViewIndexListModel
so the work around mentioned there would not work for me.
What I really need is to get the first item in the control according to the current sorting. I can get what I want by calling GetTopItem()
which returns the top-most visible item. This gives me the answer I want when the control is scrolled to the top, but not otherwise. Hence my idea of first scrolling to top and then invoking GetTopItem()
but I haven’t been able to figure out how to scroll a DataViewCtrl
programmatically.