RE: Listview and time...
- Posted by Jonas Temple <jktemple at yhti.net> Apr 05, 2001
- 529 views
Derek Parnell wrote: > David's correct, and the only *really* tricky part is getting the scroll > bar > looking right. You might have to pretend that there are 2700 lines in a > listview when at any given time there are only what's visible. Oh, and > sorting could be fun too! Derek, Maybe this is not related but I accomplished incremental adding of list view items with the following event handler: procedure ResultsLV_onEvent ( int iMsg, atom wParm, atom lParm ) atom rtn_code, pos if iMsg = WM_VSCROLL then pos = sendMessage(ResultsLV, LVM_GETTOPINDEX, 0, 0) + 1 if pos >= last_rec - 20 then loadNextBlock() end if end if if iMsg = LVM_SORTITEMS then returnValue(True) end if end procedure onEvent[ResultsLV] = routine_id("ResultsLV_onEvent") This way you don't have to draw the scroll bar and it also handles the sorting issue (well, not really handling it, just ignoring it). Maybe this would be a routine to include in Win32Lib? Jonas