Sign in to follow this  
Followers 0
marko29

UDFlistView_delete item fails even on correct index!

4 posts in this topic

#1 ·  Posted (edited)

I create my listview with koda using built in GUICtrlCreateListView() function. Later i add the item with UDF, using add item, also then i normaly find index of desired item with UDF's findintext()

Index returns correctly but when i then use UDF's deleteitem() it returns FALSE(fails), is this because i cant delete items with udf if they are created by built in function GUICtrlCreateListView() or a bug?

My assumption is that its bit of both.

I find it that autoit doesnt have a built in func like delete_item of a listview so i need to use the UDF version, i could use guidelete built in but then i would need to declare every item into variable which is not comfrotable thing to do for me because of the way i add items + there is bunch of them so you can imagine how many vars i would need to declare.

Any ideas good people?

edit: Just checked and it seems that i can delete items only if the listview is created by UDF function, to make things worse if you create it that way you must set guiwindow as parent, using groupcontrol as parent fails(which is what i plan to do, insert list into groupcontrol)

So i am in a deep dogstack atm, going around this with UDF's setitemtext and then i set it to "" which still looks ugly but at least it gives me correct look what items are deleted.

Edited by marko29

Share this post


Link to post
Share on other sites



Ok, it seems this is a bug.

If i add items by normal a3 function guicreatelistviewitem i can later normally delete items but when i use udf function additem() afterwards there is no way to delete items with _GUICtrlListView_DeleteAllItems() or _GUICtrlListView_DeleteItem()

Both function will fail

So watch out how you add your items, for now i suggest to avoid additem() function

Share this post


Link to post
Share on other sites

It will be more easy to help you if you show your script...Posted Image


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

It will be more easy to help you if you show your script...Posted Image

I explained everything needed, if you see any reason why should i add full script please explain. Also as i said i solved this by changing functions and used createitem which worked perfectly so i dont see anything as explanation that additem is bugged.

Share this post


Link to post
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
Sign in to follow this  
Followers 0