IonicWind Software

IWBasic => GUI Central => Topic started by: Jim Scott on February 26, 2007, 12:25:27 AM

Title: Listview scroll position
Post by: Jim Scott on February 26, 2007, 12:25:27 AM
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?
Title: Re: Listview scroll position
Post by: mrainey on February 26, 2007, 03:00:17 AM
I use this approach:

SetID "LVM_EnsureVisible",4115

ControlCmd(ThreadWin,lstTapDrillSizes,@LVSetSelected,100)
SendMessage(ThreadWin,@LVM_EnsureVisible,100,0,lstTapDrillSizes)
Title: Re: Listview scroll position
Post by: Jim Scott on February 26, 2007, 05:47:22 PM
That did the trick.  Thanks, works great and easy to use.  Just the way I need it.

Jim Scott