May 05, 2024, 06:08:36 PM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Listview scroll position

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

Previous topic - Next topic

0 Members and 2 Guests 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