1. RE: Faster addLVItem's
- Posted by Derek Parnell <Derek.Parnell at SYD.RABOBANK.COM> Jul 23, 2002
- 375 views
This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_000_01C2329D.3341A6B0 charset=iso-8859-2 > -----Original Message----- > From: rswiston at hotmail.com [mailto:rswiston at hotmail.com] > Subject: Faster addLVItem's > > > > Does anyone know how to speed up the adding of item to a list > view. I have > a database of over 30,000 records and it uploads quit > nicely... However, > when I go to put that data into a list view, it slows > everything down and > takes quite alot of time! > > Anyone have any suggestions? Don't use a ListView Seriously though, why are you using a ListView? Specifically, what features of a ListView are you wanting to use? You might be better off simulating a ListView using simple child window(s) and a scrollbar. I'll try to knock an example if you give me a hint about what you need. ----------- Derek. ================================================================== De informatie opgenomen in dit bericht kan vertrouwelijk zijn en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onterecht ontvangt wordt u verzocht de inhoud niet te gebruiken en de afzender direct te informeren door het bericht te retourneren. ================================================================== The information contained in this message may be confidential and is intended to be exclusively for the addressee. Should you receive this message unintentionally, please do not use the contents herein and notify the sender immediately by return e-mail. ================================================================== ------_=_NextPart_000_01C2329D.3341A6B0 Content-Type: application/ms-tnef
2. RE: Faster addLVItem's
- Posted by Derek Parnell <Derek.Parnell at SYD.RABOBANK.COM> Jul 23, 2002
- 410 views
This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_000_01C232D0.01A6A500 charset=iso-8859-2 My first idea would be to allow some filtering before loading data into the LV. Does the user really need to process 30K cheques at one sitting? Maybe you can offer selection by date range, and type of transaction, and status, and originating bank, etc... This way, the user is focusing on a subset that may be more manageable. The LV sounds like overkill if you don't need sorting by clicking on column header, or allowing the user to shift the columns around, or icons against each cheque. The User Drawn LV as suggested by Tone would also be an idea. I requires just a little bit more work than normal, but it might still be worth it. The simple list is one way. It supports multiple selection so I'm not sure what problems you've had with that. As for alignment, if you use a fixed font such as Courier New, you can get characters to line up. Anyhow, I'll have a go at an alternative solution and post it to you. ----------- Derek. > -----Original Message----- > From: rswiston at hotmail.com [mailto:rswiston at hotmail.com] > Sent: Wednesday, 24 July 2002 14:55 > To: EUforum > Subject: Re: Faster addLVItem's > > > > Derek, > > I am working on an accounting package (no one likes Qbooks). > The needs are > 30+ thousand checks, including deposits, voids, etc. The > reason I use a > list view is because it allows the user to select multiple > checks to print, > void, delete or wahtever just like file selections that > everyone is used to > and display information aligned nice and neatly.. I tried to > use List, but > it did not allow multiple line selections quite so easily, > nor does it allow > for perfect alignment when you need to display check no., check date, > description, amount, and balance. > > What would you suggest? > > ----- Original Message ----- > From: "Derek Parnell" <Derek.Parnell at SYD.RABOBANK.COM> > To: "EUforum" <EUforum at topica.com> > Sent: Tuesday, July 23, 2002 5:01 PM > Subject: RE: Faster addLVItem's > > > > > -----Original Message----- > > > From: rswiston at hotmail.com [mailto:rswiston at hotmail.com] > > > Sent: Wednesday, 24 July 2002 8:43 > > > To: EUforum > > > Subject: Faster addLVItem's > > > > > > > > > Does anyone know how to speed up the adding of item to a list > > > view. I have > > > a database of over 30,000 records and it uploads quit > > > nicely... However, > > > when I go to put that data into a list view, it slows > > > everything down and > > > takes quite alot of time! > > > > > > Anyone have any suggestions? > > > > Don't use a ListView > > > > Seriously though, why are you using a ListView? Specifically, what > features > > of a ListView are you wanting to use? > > > > You might be better off simulating a ListView using simple > child window(s) > > and a scrollbar. > > > > I'll try to knock an example if you give me a hint about > what you need. > > > > ----------- > > Derek. > > > > ================================================================== > > > > > > ================================================================== > > > > > > > ================================================================== De informatie opgenomen in dit bericht kan vertrouwelijk zijn en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onterecht ontvangt wordt u verzocht de inhoud niet te gebruiken en de afzender direct te informeren door het bericht te retourneren. ================================================================== The information contained in this message may be confidential and is intended to be exclusively for the addressee. Should you receive this message unintentionally, please do not use the contents herein and notify the sender immediately by return e-mail. ================================================================== ------_=_NextPart_000_01C232D0.01A6A500 Content-Type: application/ms-tnef
3. RE: Faster addLVItem's
- Posted by Tony Steward <tony at locksdownunder.com> Jul 24, 2002
- 395 views
Hi All, A lot of talk about virtual listviews. Could someone knock up an example of how we can use the VLV. Also Virtual or not, is there a way a user can move the columns in a LV. Thanks Tony 10963508 at europeonline.com wrote: > > ----- Original Message ----- > From: "Derek Parnell" <Derek.Parnell at SYD.RABOBANK.COM> > > > The User Drawn LV as suggested by Tone would also be an idea. I > > requires just a little bit more work than normal, but it might still be > > worth it. > > I think it doesn't require a lot of work, you don' actually need to draw > items, you only need to pass it item data when it asks you. > It would look nicer than making you own listview or whatever - that > would > look "uglier" for sure! :) > >
4. RE: Faster addLVItem's
- Posted by Derek Parnell <Derek.Parnell at SYD.RABOBANK.COM> Jul 24, 2002
- 390 views
This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_000_01C232FA.FF125700 charset=iso-8859-1 I'm doing that right now, as a matter of fact. I'll post the results soon. > -----Original Message----- > From: Tony Steward [mailto:tony at locksdownunder.com] > Subject: RE: Faster addLVItem's > > > > Hi All, > A lot of talk about virtual listviews. > Could someone knock up an example of how we can use the VLV. > > Also Virtual or not, is there a way a user can move the > columns in a LV. > > Thanks > Tony > > 10963508 at europeonline.com wrote: > > > > ----- Original Message ----- > > From: "Derek Parnell" <Derek.Parnell at SYD.RABOBANK.COM> > > > > > The User Drawn LV as suggested by Tone would also be an idea. I > > > requires just a little bit more work than normal, but it > might still be > > > worth it. > > > > I think it doesn't require a lot of work, you don' actually > need to draw > > items, you only need to pass it item data when it asks you. > > It would look nicer than making you own listview or whatever - that > > would > > look "uglier" for sure! :) > > > > > > > ================================================================== De informatie opgenomen in dit bericht kan vertrouwelijk zijn en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onterecht ontvangt wordt u verzocht de inhoud niet te gebruiken en de afzender direct te informeren door het bericht te retourneren. ================================================================== The information contained in this message may be confidential and is intended to be exclusively for the addressee. Should you receive this message unintentionally, please do not use the contents herein and notify the sender immediately by return e-mail. ================================================================== ------_=_NextPart_000_01C232FA.FF125700 Content-Type: application/ms-tnef
5. RE: Faster addLVItem's
- Posted by Matthew Lewis <matthewwalkerlewis at YAHOO.COM> Jul 24, 2002
- 384 views
This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_000_01C23306.03700AD0 charset="iso-8859-2" > -----Original Message----- > From: Derek Parnell [mailto:Derek.Parnell at SYD.RABOBANK.COM] > The simple list is one way. It supports multiple selection so > I'm not sure what problems you've had with that. As for > alignment, if you use a fixed font such as Courier New, you > can get characters to line up. You can also set tab stops in a list, making this task even easier. Matt Lewis ------_=_NextPart_000_01C23306.03700AD0 Content-Type: application/ms-tnef
6. RE: Faster addLVItem's
- Posted by Derek Parnell <Derek.Parnell at SYD.RABOBANK.COM> Jul 24, 2002
- 373 views
This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_000_01C23303.54E88C00 charset=iso-8859-1 > -----Original Message----- > From: Tony Steward [mailto:tony at locksdownunder.com] > Subject: RE: Faster addLVItem's > > > > Hi All, > A lot of talk about virtual listviews. > Could someone knock up an example of how we can use the VLV. > ------------------------------------------------ -- Viewer.exw Version: 1.0 -- -- This is one technique that can be used to view a large number of records. ------------------------------------------------ without warning include win32lib.ew object VOID ------------------------------------------------ -- Controls IDs ------------------------------------------------ integer MainWin, SB, Viewer sequence vData vData = {} integer vMaxData vMaxData = 35000 procedure buildDummyData(integer pCount) sequence lDate sequence lAmount sequence lChqNo sequence lStatus sequence lBank for i = 1 to pCount do lDate = sprintf("2001 %02d %02d", {rand(12), rand(28)}) lAmount = sprintf("%9.2f", rand(999999)/100) lChqNo = sprintf("%6d", rand(999999)) lStatus = iff(rand(10) < 3, "R", " ") lBank = sprintf("%5d", rand(9999)+10000) vData = append(vData, {lChqNo, lDate, lAmount, lStatus, lBank}) end for end procedure function getdispinfo(integer id, atom hWnd, atom wParam, atom lParam) atom lMask integer lColumn, lRow sequence lData id = getId( fetch( lParam, NMHDR_hwndFrom )) if id != 0 then lMask = fetch( lParam, LVDISPINFO_LVITEMmask ) lColumn = fetch( lParam, LVDISPINFO_LVITEMiSubItem ) + 1 lRow = fetch( lParam, LVDISPINFO_LVITEMiItem ) + 1 if and_bits(lMask, LVIF_TEXT) then if lRow <= vMaxData then if lRow > length(vData) then setText(SB, sprintf("%3.2f%% loaded", (100 * length(vData) )/ vMaxData)) buildDummyData( lRow - length(vData)) end if lData = vData[lRow][lColumn] store(lParam, LVDISPINFO_LVITEMpszText, lData) store(lParam, LVDISPINFO_LVITEMcchTextMax, length(lData)) else store(lParam, LVDISPINFO_LVITEMpszText, -1) store(lParam, LVDISPINFO_LVITEMcchTextMax, -1) end if end if end if return kReturnNow end function ------------------------------------------------ procedure Activate_MainWin(integer self, integer event, sequence parms) ------------------------------------------------ VOID = sendMessage( Viewer, LVM_SETITEMCOUNT, vMaxData, 0) VOID = setNotifyHandler(LVN_GETDISPINFO, routine_id("getdispinfo")) end procedure ------------------------------------------------ -- Application Initiation ------------------------------------------------ function AppInit() integer lRC lRC = 0 MainWin = createEx(Window, "", 0, 0, 0, 600, 400, 0, 0) SB = createEx( StatusBar, "", MainWin, 0,0,0,0, 0, 0) Viewer = createEx( ListView, {"Chq#","Date","Amount","Status","Bank"}, MainWin, 10,20,540, 310, or_all({LVS_REPORT ,LVS_OWNERDATA }) , 0) VOID = sendMessage(Viewer, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, or_all({LVS_EX_FULLROWSELECT,LVS_EX_HEADERDRAGDROP})) -- Link in the event handlers. setHandler(MainWin, w32HActivate, routine_id("Activate_MainWin")) return lRC end function if AppInit() = 0 then WinMain( MainWin, Normal) end if ------------------------- > Also Virtual or not, is there a way a user can move the > columns in a LV. See the example above, but it is done thru setting an extended listview style... Here is the code to set JUST that style and no others... VOID = sendMessage(Viewer, LVM_SETEXTENDEDLISTVIEWSTYLE, LVS_EX_HEADERDRAGDROP,LVS_EX_HEADERDRAGDROP) ----------- Derek. ================================================================== De informatie opgenomen in dit bericht kan vertrouwelijk zijn en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onterecht ontvangt wordt u verzocht de inhoud niet te gebruiken en de afzender direct te informeren door het bericht te retourneren. ================================================================== The information contained in this message may be confidential and is intended to be exclusively for the addressee. Should you receive this message unintentionally, please do not use the contents herein and notify the sender immediately by return e-mail. ================================================================== ------_=_NextPart_000_01C23303.54E88C00 Content-Type: application/ms-tnef