How to store items in array of IMGTAGs, so I can sort, find ana delete items in this array?
First i define the bitmaps:
bm_blue = bitmap 4 50 color:blue
bm_white = bitmap 4 50 color:white
then the ImgTags and the array:
imgtag b1 "imgtag" bitmap:bm_white
imgtag b2 "imgtag" bitmap:bm_white
imgtag b3 "imgtag" bitmap:bm_white
imgtag b4 "imgtag" bitmap:bm_white
arrImgTag = #() as array
Starts collecting data in arrImgTag:
append arrImgTag b2
append arrImgTag b4
append arrImgTag b1
append arrImgTag b5
append arrImgTag b3
If I want to change the color of ImgTags I use this code:
for i = 1 to arrImgTag.count do
arrImgTag.bitmap = bm_blue
and it works
But, if I want to sort or find item in arrImgTag - the problem appears
sort arrImgTag
Error: -- No "">"" function for ImgTag:b3
findItem arrImgTag <what to type here>
because non of this is work:
findItem arrImgTag ImgTag:b3
findItem arrImgTag (ImgTag:b3)
findItem arrImgTag (b3)
If I use findItem arrImgTag 2
the answer of maxlistener is always 0.
When I print arrImgTag, maxListener shows this:
#(ImgTag:b2, ImgTag:b4, ImgTag:b1, ImgTag:b5, ImgTag:b3)
I can use only
deleteitem arrImgTag 2
but this will delete the second item in array, but I want to delete "ImgTag:b2", not "ImgTag:b4"
How to store data in arrImgTag, so later I can sort the array, find and delete specific items, and change color of all ImgTag with code like this
for i = 1 to arrImgTag.count do
arrImgTag.bitmap = bm_blue
P.S. Sory for my bad english
Replies