listview help

dgoss

Member
Licensed User
Longtime User
If u have a Listview with addtwolinesandbitmap and u want to save list to file(map) how do u save the bitmap part, and recall bitmap(I know how to do it with a single line)
I know u can use TYPE watchamacallit, but to be honest i have not got a clue how to use it. I'm not asking for anyone to do my coding for me(well i am really ha..ha) but a simple (if thats possible) bit of code to show me the way.
many thx in advance
 

dgoss

Member
Licensed User
Longtime User
Can you write the bitmap to dirrootexternal, then just save the filename to the map? When you read the map, it will give you the file name, and you know the directory to look in.

thx MotoMusher for your quick reply

Its an idea, but what i had in mind was that i would have 4 bitmap that would represent an activity and time at the push of a button(s) so basicly no one bitmap follows itself.
i would like to use the file.dirassets as the bitmaps are not changeable and it keeps it in house(i think)
 
Upvote 0

dgoss

Member
Licensed User
Longtime User
I'm confused. If your bitmaps are already in .dirassets, what are you looking to save in the map then, if not which one was active? Perhaps post an example of your code?

Sorry but the code to big to upload.
The idea is that i save the listview to a FILE(maybe map was wrong word if so sorry for confusion) at the end of the day so that it can be reloaded to a listview to be reviewed at a later date with bitmap and times to verify the activity done and time it was done
ie:-
bitmap(work) time(time started)
bitmap(rest) time(time started)
bitmap(work) time(time started)

(Basically if a time stamp like clocking in and out of work but with pictures)
Does this help
 
Upvote 0

MotoMusher

Active Member
Licensed User
Longtime User
Map was correct I believe. (RandomAccessFile may be more secure for you if you don't want people editing the file by the way)

I guess what I am saying is adjust your routine to not read the bitmap directly, but indirectly.

dim b as bitmap
b.Bitmap = LoadBitmapSample(file.dirassets, "work.jpg from map file"), 75dip, 75dip)
bitmap(b) time(time started)

just save the string "work.jpg" in your map. You can do it when you set the image by using imageobject.tag = "work.jpg"
 
Upvote 0

dgoss

Member
Licensed User
Longtime User
Map was correct I believe. (RandomAccessFile may be more secure for you if you don't want people editing the file by the way)

I guess what I am saying is adjust your routine to not read the bitmap directly, but indirectly.

dim b as bitmap
b.Bitmap = LoadBitmapSample(file.dirassets, "work.jpg from map file"), 75dip, 75dip)
bitmap(b) time(time started)

just save the string "work.jpg" in your map. You can do it when you set the image by using imageobject.tag = "work.jpg"

thx MotoMusher
Will give it a go after work will let u know how it goes
 
Upvote 0
Top