khchen / wNim

Nim's Windows GUI Framework
MIT License
326 stars 17 forks source link

Help needed: How to get the position of a scroll bar in ListCtrl? #85

Closed nnahito closed 3 years ago

nnahito commented 3 years ago

I want to create a mechanism in ListCtrl that will automatically scroll to the bottom when an item is added, but only when the scrollbar is at the bottom.

However, there doesn't seem to be a method in the help to get the position of the scrollbar. https://khchen.github.io/wNim/wListCtrl.html

Is it possible to get the position of the scroll bars and achieve what I want?

I would appreciate it if you could let me know. Thank you very much.

khchen commented 3 years ago

You should try proc ensureVisible().

nnahito commented 3 years ago

Thank you for your reply. I'll try it. Thank you!