May 11, 2024, 07:38:58 AM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Listview scroll position

Started by Jim Scott, February 26, 2007, 12:25:27 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Jim Scott

I know I can retrieve the current scrolled position of a list view control by using;

Position = CONTROLCMD(win,id, @LVGETTOPINDEX)

It would be real nice to have a way to set it with something like,

ControlCMD(win,id,@LVSETOPINDEX,Postion)

Thus having program control over the scrolled position.

Is there a fairly simple way to do this?
Jim Scott

mrainey

I use this approach:

SetID "LVM_EnsureVisible",4115

ControlCmd(ThreadWin,lstTapDrillSizes,@LVSetSelected,100)
SendMessage(ThreadWin,@LVM_EnsureVisible,100,0,lstTapDrillSizes)
Software For Metalworking
http://closetolerancesoftware.com

Jim Scott

That did the trick.  Thanks, works great and easy to use.  Just the way I need it.

Jim Scott
Jim Scott