Re: ExplorerListGadget

Just starting out? Need help? Post your questions and find answers here.
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4792
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: ExplorerListGadget

Post by Fangbeast »

Does anyone know how to remove a line from ExplorerListGadget? RemoveGadgetItem doesn't seem to work, even though technically it is a ListIconGadget
Amateur Radio/VK3HAF, (D-STAR/DMR and more), Arduino, ESP32, Coding, Crochet
freak
PureBasic Team
PureBasic Team
Posts: 5948
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

This should work (can't test right now though)

Code: Select all

SendMessage_( GadgetID(#ExplorerList), #LVM_DELETEITEM, Item, 0)
(where 'Item' is the item to remove)

Also this one will cause a refresh of the Gadget:

Code: Select all

SetGadgetText(#ExplorerList, GetGadgetText(#ExplorerList))
However, although this scans the whole directory again, it doesn't seem
to imediately display a file deleete on some systems (due to some disk
caching thingy maybe?)

Timo
quidquid Latine dictum sit altum videtur
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4792
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Great stuff!!

Post by Fangbeast »

Thanks Freak, worked wonderfully, nice and fast too. I worked out the refresh already a few weeks ago but this one got me lost. API's usually do:):)
Amateur Radio/VK3HAF, (D-STAR/DMR and more), Arduino, ESP32, Coding, Crochet
Post Reply