Sign in to follow this  
Followers 0
Reinhardt1julian

Save / Load ListView

12 posts in this topic

How can i save a listview with all the items (for example in a txt file), and when the program starts next time it should read this file. And if this file is not there, it should create it.

Share this post


Link to post
Share on other sites



Reinhardt1julian,

So you want to know how to read each item in a ListView and write it to a file? And then read a file and write the contents to a ListView? What functions have you found in the Help file that might work? What code have you tried? :huh:

Have you noticed a certain theme in my last few repies? Stop expecting us to provide you with absolutely everything and start doing some work for yourself. Clear? :naughty:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

my problem is, that GUICtrlRead won't read the whole list view

Share this post


Link to post
Share on other sites

Reinhardt1julian,

So you perhaps need to look at the _GUIListView UDF. There you will find _GUICtrlListView_GetItemTextString which reads a whole line from a ListView. You will of course have to loop through all the lines - _GUICtrlListView_GetItemCount might be useful to find out how many there are. ;)

Are you getting the message about the Help file yet - please do start reading it. :)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

I cand find the Solution in the help file, so how can is set which line _GUICtrlListView_GetItemTextString should read?

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Nope, still cant find anything, is it even possibel? (I hope im not too annoying :/)

Edited by Reinhardt1julian

Share this post


Link to post
Share on other sites

Ok. Now i got the code. Let's say i have this in the txt file.

cd|ab
gh|ef

Now i want to import it, cd (column 1 row 1), ab (column 2 row 1), ...

Share this post


Link to post
Share on other sites

Reinhardt1julian,

I hope im not too annoying

Well, you have certainly exhausted my well of patience for today - and quite possibly longer. :bye:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Ok, that i have something goot to say, I figured everything out! No more questions yet!

Share this post


Link to post
Share on other sites

Reinhardt1julian,

Ok. Now i got the code. Let's say i have this in the txt file.

Why do you earlier did not write it? This forces the other to make monkey work.

- try to use the correct separator (delimiter).

Share this post


Link to post
Share on other sites

Why do you earlier did not write it?.

I'm sorry, but i got it 10 seconds before i wrote it. So i clouldn't write it earlier :/

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