flash44 Posted April 22, 2006 Posted April 22, 2006 Hi.I have a problem with large number of records in a ListView (way over the 4000 limit).Now, I've noticed a Bulk Load A ListViewmessage, unfortunatelly, as much as randallc's code might be the answer to all my problems, I just cannot grasp the 'per page scrolling' idea :/Is this the only feasible way or perhaps is there another solution?Help, anyone? Please? :-)The script + datafile is attached to this post.MatchMaker.zip
Zedna Posted April 22, 2006 Posted April 22, 2006 (edited) As another solution you can also create listview items directly using Win32 API instead of AutoIt GUICtrlCreateListViewItem by using LVM_INSERTITEM message for listview control. You must prepare LV_ITEM structure for that message.EDIT: look at _GUICtrlListViewInsertItem in GuiListView.au3 in include directoryEDIT2: sorry, in Bulk Load A ListView example is this way already used, I looked at it just now So no other idea from me. Edited April 22, 2006 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search
Zedna Posted April 22, 2006 Posted April 22, 2006 (edited) I tested it for now and iit's working, only slower: In your code change: GUICtrlCreateListViewItem($procent & "% "& $line, $ShopList) to: _GUICtrlListViewInsertItem($ShopList, -1, $procent & "% "& $line) Edited April 22, 2006 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search
Zedna Posted April 22, 2006 Posted April 22, 2006 Now I noticed in your code that you have my change in it only commented.So sorry, but you must be exact in your questions.Here is not problem with not possibility but with speed,it can be done, but it's very slow.Here is my optimized version of your example,I replaced counting number of lines in TXT file by StringSplitand that array used also for reading data instead of second file accesing in orig. version.matchmaker.au3But note most slower still remain function _GUICtrlListViewInsertItem.Optimizing this function for speed is beyond my experiences Resources UDF ResourcesEx UDF AutoIt Forum Search
flash44 Posted April 23, 2006 Author Posted April 23, 2006 Zedna said: Now I noticed in your code that you have my change in it only commented.OMG, I haven't actually noticed that _GUICtrlListViewInsertItem is not prone to the limit problem!When I was writing the script, I just considered it to be slower, so I just stopped using it.It was later that I hit the GUI limitation and didn't even get the idea to test the slower solution that I had already dumped! LOL! AND THANK YOU SO MUCH FOR POINTING THIS OUT! Zedna said: Here is my optimized version of your example,I replaced counting number of lines in TXT file by StringSplitand that array used also for reading data instead of second file accesing in orig. version.(...)Optimizing this function for speed is beyond my experiences Oh my behind is sooo saved right now :-) Thank you so much!
The Kandie Man Posted April 24, 2006 Posted April 24, 2006 Only one problem, how do I get the controlID of the newly created listview item. In order to change the icon of the list view item, i have to know the controlID to use GUICtrlSetImage(). Is there a way around this? "So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire
Zedna Posted April 24, 2006 Posted April 24, 2006 The Kandie Man said: Only one problem, how do I get the controlID of the newly created listview item. In order to change the icon of the list view item, i have to know the controlID to use GUICtrlSetImage(). Is there a way around this?Instead of GUICtrlSetImage() you must use TVM_xxxx messages. For this it will be TVM_SETITEM I think. Resources UDF ResourcesEx UDF AutoIt Forum Search
ptrex Posted April 24, 2006 Posted April 24, 2006 (edited) @flash44You can also use an Excel Grid in AutoIT which does not have the 4000 limits.See here for the code :Excel Grid in AutoIT Edited April 24, 2006 by ptrex Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New
tonedeaf Posted April 26, 2006 Posted April 26, 2006 Can you post an example of of a TVM_xxxx msg. I really want to manipulate list view items (change color, setting icon) without knowing their ControlIDs. Thanks
Zedna Posted April 26, 2006 Posted April 26, 2006 (edited) tonedeaf said: Can you post an example of of a TVM_xxxx msg. I really want to manipulate list view items (change color, setting icon) without knowing their ControlIDs.ThanksAs I wrote:look at _GUICtrlListViewInsertItem,... in GuiListView.au3 in latest beta include directory.In that file search for LVM_SETITEM, LVM_GETITEM, LVM_INSERTITEM,...EDIT: TVM_xxxx is for treeview an LVM_xxxx is for listviewand you can look also in GuiTreeView.au3EDIT2: and for example code using it look at my TreeView sample Edited April 26, 2006 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now