Jump to content

Listview/gui Number Of Records Limitation :/


flash44
 Share

Recommended Posts

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 ListView

message, 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

Link to comment
Share on other sites

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 directory

EDIT2: sorry, in Bulk Load A ListView example is this way already used, I looked at it just now :think: So no other idea from me.

Edited by Zedna
Link to comment
Share on other sites

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 StringSplit

and that array used also for reading data instead of second file accesing in orig. version.

matchmaker.au3

But note most slower still remain function _GUICtrlListViewInsertItem.

Optimizing this function for speed is beyond my experiences :think:

Link to comment
Share on other sites

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!

Here is my optimized version of your example,

I replaced counting number of lines in TXT file by StringSplit

and that array used also for reading data instead of second file accesing in orig. version.

(...)

Optimizing this function for speed is beyond my experiences :think:

Oh my behind is sooo saved right now :-) Thank you so much!
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Link to comment
Share on other sites

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

As 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 listview

and you can look also in GuiTreeView.au3

EDIT2: and for example code using it look at my TreeView sample

Edited by Zedna
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...