July 20, 2024, 06:42:12 AM

News:

IWBasic runs in Windows 11!


Editable Listview

Started by Brian, December 30, 2019, 05:44:34 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Brian

December 30, 2019, 05:44:34 AM Last Edit: January 01, 2020, 05:17:58 AM by Brian
As part of another program I have been messing with, I needed a way to edit a text file. I looked around the forum, and an edit-in-place listview was the best option for me

Attached the program, and a text file to play with

On running, it loads up the test file into a listview. If the file is missing, it creates a dummy one for you to start with

All four columns of the listview are sortable
Each listview line is coloured alternately
There are tooltips for each button
You can add a blank line to the listview for a new entry
You can delete a line (one at a time)
You can select a line, and tab forwards and backwards on that line
You can close the program and save the data
Data is saved in the column sort order you last used
Or, you can close the program without saving the data

If you add more columns for your own use, set the variable LvCols to a different value for the tabbing to work correctly

Brian

Modification: If the file Dates.txt is missing, it now creates a new one, and inserts a blank entry for you. No need to restart the program

Initial zip file now replaced

h3kt0r


Andy

December 31, 2019, 06:34:39 AM #2 Last Edit: December 31, 2019, 06:38:44 AM by Andy
Brian,

Like the editable list view, may come in very useful over time.

Andy.
:)
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

Brian

Program updated. See first post

Brian

Brian

January 01, 2020, 10:59:09 AM #4 Last Edit: January 01, 2020, 11:32:56 AM by Brian
This program is a companion to the Dates Editor posted above. You can find it on the forum (somewhere) as Jonz Calendar. The problem with the original is that it didn't give you a lot of control on how the calendar was printed
I printed 2020 with the Jonz's version, and the dates were out of sync, with it being a leap year. All sorted now, and with a new interface
You can add up to five names to be printed with each day, good for birthdays of your family, etc. And it also gives their age in years next to the name
You can also omit certain months to be printed. In my case, I was printing the full year, and ran out of ink for August. When I got some ink, I had to start all over again, which I wasn't happy about
I have called it Brians Calendar, 'cos I'm not called Jon!
Of course, it imports and uses the dates and names from the Dates.txt file

Brian

PS: I have tried to combine the two programs, and I was successful, with no errors, but the sub-classing of the listview went all wrong, so I abandoned the idea. If anyone can put them both together, it would make it a lot neater

Andy

Brian,

Are you trying to make the list view in the calendar program editable?

Is that the problem you had?

Andy.
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.