When I first released ToDoList more than 11 years ago it was as a consequence of exploring some UI ideas, the principal of which was using the non-client region of a tree-view control to draw attribute columns.

But while this satisfied my research goal it had a major drawback: The attribute columns could not move independently of the task titles meaning that if you displayed too many columns the task title got squeezed and some of the attribute columns might not be visible.

In addition there was no column reordering or resizing because I would have had to write this from scratch and that seemed too great an effort when the built-in Windows list-view gave you that for free. So I pushed the problem into the background and palmed-away questions as they came up.

Then sometime in 2012 I started to think about creating a Gantt plugin and I realised that the 'tree-part' and the 'bar-part' were going to have to be physically separate because the 'bar-part' was definitely going to need to scroll horizontally but that scrolling could not cause the 'tree-part' to be hidden. And I further realised that solving this might also provide the solution to Task-Tree attribute columns issue.

So I started work on a 'Tree-List-Syncer' whose primary goal was to synchronise the vertical scrolling of either a tree and a list or two lists, positioned side-by-side. Additionally the LHS widget had to hide its vertical scrollbar and instead respond to scroll events from the RHS widget.

The Gantt plugin was released with 6.7 in 2013 and proved successful as a solution yet it still took a couple more versions for me to summon up the courage to pull open the guts of the app to replace the Task-Tree and List-View. I think I was still hoping that the Gantt plugin would reveal a huge flaw in my approach so that I didn't have to do the work!

But here it is. Both the Task-Tree and List-View now have task attributes that can be scrolled horizontally without impacting the task titles. They are divided by a splitter bar (which can be effectively hidden in the preferences) giving total control over 'pane' widths. Attributes columns can be reordered and resized by dragging the column header dividers ala Explorer.

I do understand that some of you will find these changes upsetting but they had to made in order that other more important usability features could be included to keep ToDoList relevant.

Introduction

You know how it is - you start work on one project and halfway through, you find one or two side-projects crop up that have to be solved before you can continue on the original project.

This is one such project with the added twist that it too started its life as a side-project. Here's what happened:

<Cue wavy screen effect>

I can only imagine that the planets must have been in (mis-)alignment or something, because at one point a few months ago, I was suddenly fielding emails on four or five separate articles I had previously submitted to CodeProject, some asking for features and others for bug fixes.

Foolishly or otherwise, I largely agreed with all the points raised, and subsequently found myself with fourteen or fifteen separate issues to resolve.

The situation was also made worse because I was trying to use CodeProject to keep track of all the things I had agreed to do, meaning that I had to continuously trawl the comments section of each article to remind myself of what I was supposed to be working on.

It even got to the stage where I was worrying that I'd fail to deliver on something - silly I know, but there you are!

Keeping a list on paper was a definite step in the right direction, but since I do all my coding on the same machine, it seemed somewhat inelegant, and anyway, we all know what happens to crucial bits of paper left lying around on desks and such.

The next step was to hunt around on the web for a tool to meet the following requirements:

Simple interface

Support for hierarchical data

Numbered items/subitems

Open file format

Freeware

Simple, huh! not!

I will admit that I did not spend weeks searching, but I am still surprised at the general lack of software matching my needs.

On reflection, I think that the reason may be simple: people are so used to commercial software being 'feature-rich' that when they come to design software themselves, they (not unreasonably) think they too need to cram as much in as possible, often leading to software where a lot of essential functionality is hidden away in the menu bar.

So, surprise, surprise, I decided to write something myself.

However, it's fair to say that I did not originally intend to post it on CodeProject and am only really doing so because I had a heap of fun solving some very interesting problems and these are what I think make it worth it.

Using the Software

There's really very little I need to say here since every feature/function is explicitly visible in the interface.

Nevertheless, the following list of basic capabilities and omissions may go someway to answering any questions that arise:

Files are stored in XML format with .xml file extension.

Trying to load a non-tasklist file will generally fail (unless you read the code to see how to circumvent it).

The number of items/subitems is limited only by memory (although performance may be the deciding factor before you exhaust memory).

Marking a parent item as 'done' will also gray-out child items, but they are not disabled or automatically marked as 'done'.

An ellipsis (...) indicates that an item has sub-items.

All items can be expanded or collapsed (by double-clicking).

Top-level items and sub-items are created using different toolbar buttons.

There are task-specific context-menus.

The previously open tasklists are re-opened on startup.

The tasklist is automatically saved when closing the software or minimizing it to the system tray.

The priority of a task is shown as a grayscale box to the left of the item.

Points of Interest

Here's where we come to the side-projects I was talking about, the first two of which I intend to work up into follow-up articles.

They are:

The 'ordered' tree control, which incorporates a non-client gutter for displaying the item numbers.

The idea stemmed from research I did into alternative designs for a tree-list control, which did not solve it by creating a hybrid control incorporating a tree and a list.

The hybrid control seems such an obvious solution that I suspect few people have stopped to question it, but it has still always struck me as looking far too much like hard work to be truly elegant ('square pegs' and 'round holes' spring to mind).

One possible idea is to implement the 'list' portion entirely in the non-client area of the tree. I.e., shift the right hand client edge to the left and then render the list portion in the resulting non-client area.

Whilst I've yet to get round to building a proof of concept, it was nevertheless this ongoing mental debate which prompted me to try to solve the requirement for numbered items and subitems by rendering the item/subitem numbers in the non-client area.

Without going into too much detail (as this will subsequently be an article of its own), this is how I got it to work:

Handle TVM_INSERTITEM and TVM_DELETEITEM to know exactly when items are added and removed.

In these handlers recalculate the width of the gutter required to display the widest 'dotted' item/subitem number. (Note: this is not necessarily simply the deepest subitem.)

Handle WM_NCCALCSIZE when it does, and offset the left border by the required gutter width.

Handle WM_NCPAINT for painting the numbers.

This is necessarily an over-simplification, but it captures the essence of the solution, and all that essentially remains is lots of fiddling about to ensure the non-client area gets redrawn at the the right times to stay synchronized with the client area.

Embedding .RC control definition data directly in a .cpp file to break the dependency on binary resources (a.k.a. 'Runtime Dialogs').

This is an idea that has been floating about for quite some time and which has only recently gelled into a workable solution.

The problem, put simply, is that if you want to take advantage of the resource editor in Visual Studio (and who doesn't), then you very quickly find yourself stuck with having to load dialog templates from resources compiled into the binary file.

This further means that if you want to make use of a dialog across multiple projects, then either you need to copy and paste the dialog template between project .RC files, or you need to build the dialog into a DLL from which it can be accessed.

'Runtime Dialogs' (a snappy title I coined myself) is a solution that neatly sidesteps both the nuisance of copying dialog resources between resource files and the extra work (and maintenance) involved in packaging dialogs in DLLs.

And it works like this:

First, you design your dialog template in the resource editor, create a CDialog derived class using class wizard, and wire up all the controls just as you normally would.

Next, you #include "runtimedlg.h" and change all instances of CDialog to CRuntimeDlg.

Then, you cut and paste the control definition section from the appropriate section in the .RC file and embed it directly in the dialog's .cpp file as a static string (with a bit of tweaking to handle double quotes and such like).

Finally, in the constructor of your dialog, you simply call CRuntimeDlg::AddRCControls(...) passing the control definitions as a string.

And CRuntimeDlg takes care of the rest including, if required, auto-sizing the dialog to suit the control layout.

I'm certainly not suggesting that this is a 'win-win' solution for all situations but it certainly has merits in its closer coupling of dialog template to dialog code which makes sharing dialogs across multiple projects a breeze.

P.S.: In case it's not clear here, I used CRuntimeDlg to create CToDoCtrl which encapsulates the ordered tree together with the priority, date and comments controls as a single simple-to-instantiate control.

This is possibly the most satisfying aspect of the whole project because it was completely unexpected.

What I mean is that, until recently, my knowledge of DOM and XMLDOM was virtually non-existent, as it's only since I've become more interested in the presentation of AbstractSpoon that I've been forced to get to grips with the various implementations of DOM and XMLDOM out there.

I'm pleased to say that the code on my site works under IE 6.0, Netscape 7.1, and Mozilla, although custom code was required to achieve this.

Generic MFC Classes that may prove Useful to You

The following table lists a wide range of utility classes written for this project. They can all be included in any MFC project provided you include any class dependencies too. Feel free to ask any questions relating to these specific classes and how to use them.

Adds support for recognizing urls, clicking them and setting custom url callbacks

CWinClasses

Encapsulates the ::GetClassName Win32 functions

CXmlFile, CXmlItem

Non-Unicode class for reading and writing xml files

CXmlFileEx

Adds encryption capabilities to CXmlFile

CXmlFile, IEncryption

* CSubclassWnd was originally written by Paul DiLascia for MSJ magazine. The version I use has been heavily extended to suit my specific needs. The classes that depend on it here need this extended version.

Further Work

Whilst this tool was originally intended for my personal use only, it is now a 'community' project, so if you find it useful and want to make suggestions for enhancements or bug fixes, then post below.

History

7.0.13 (04 Feb 2016) - Mostly likely the last update of 7.0

Fixed uneven task row heights on Windows XP 64-bit

Fixed incorrect strike-through in Find Tasks dialog for incomplete parent tasks having all their subtasks completed

Fixed doubled-up Help Menu separator on XP

Fixed translation 'Cleanup' button not saving changes

Fixed XML encoding for Unicode tasklists

Fixed tasklist tab-bar resize bug after double-clicking on titlebar

7.0.12.1 (20 Jan 2016)

Fixed loading of Ansi tasklists

7.0.12 (14 Jan 2016)

Fixed bug where pasting a text fragment from Firefox would display the wrong source URL

Fixed List View selection render artifacts in full screen when resizing the title pane

Fixed inability to tab to Status field after making the field 'read-only'

Comments and Discussions

I'm wondering if you have Auto-Save set to "every 1 minute", and if you perceive the delays occurring with delays of about a minute. We usually aren't in a single task typing comments for a solid minute so this would appear to be a "random" delay followed by a period where there is no delay.

Before you pay any attention to me, can you first verify that the issue is not as iamstarbuck suggests

Tom Freier wrote:

It may take up to 0,5-1 sec until a letter is visible

This suggests that it does not affect all tasks to a similar extent.

If that is correct, are there any common characteristics of tasks that exhibit this issue? eg. Size of comments, whether the comments contain images, whether there are a lot of embedded file links or URLs, etc

If not, can you then perform the following experiment:

1. Choose a specific task with which the problem occurs 2. Take a copy of the .tdl file in the same location3. Close the original and open the copy4. Confirm that the problem still occurs with the chosen task5. Progressively remove other tasks continuing to confirm that the problem still occurs with the chosen task6. If the problem stops happening, undo the last change and see if the problem starts again7. If it does, save the tasklist, close the app and verify that the problem still occurs after restarting the app8. Report back your findings

If you actually Transform to HTML, does it look different than what you see in Print Preview?

You're saying it "doesn't work" on prior releases but have you ever seen completed tasks with a line through them? (Also referred to as "strike through".)

I just ran Z_SimpleReport.xsl to HTML and through Preview with Windows 8.1, TDL v7.0.0, and it does show completed tasks with the "line-through" styling. I ran the same test with v6.9 and it shows exactly the same. So at this time I can't reproduce the report.

The issue you're reporting might be platform/system-specific :

A "Completed" task is one that has the checkbox checked, not just a Status = Completed. It has %Complete at "100", and the "Completed Date" field is checked. Please check to see if your tasks fit this definition of "Completed". (In various places, like in style sheets this is also referred to as "Done".)

And please tell us your specific Operating System and ToDoList release.

I have discovered the problem and can confirm that it also exists with at least one of the default 7.0 stylesheets.

I caused the problem by changing 7.0 to export the 'DONEDATESTRING' field as a XML 'element' rather than as an 'attribute' for when the user asks for visible columns but the completion column is hidden.

You can easily prove this by first displaying the completion column and then performing 'Print Preview'. This is also my suggested workaround until the default stylesheets are updated to accommodate this change.

I will create a issue for this in our bug tracker and try to let you know when the new stylesheets are available. Then you can hopefully merge the required fix into your own stylesheet.

Sorry for the inconvenience this has caused and thx for making it known.

I created a task on friday which is now missing in my tdl. I can reproduce the error as my files are stored in my dropbox. So I can rollback to the correct version from friday. I can see the task in a textviewer. But every time I restart ToDoList the task gets removed and the size of the tdl goes down by 4kb. This happens in 6.9.8 as well as in 7.0.0

Just drop me a note where to send the tdl-files.

best regards,t.

P.S. I have to rollback my ToDoList.ini from time to time as well as it gets resetted quite often (the ini is located in dropbox as well). I did create a bug report 2(?) years ago and the problem seemed to have gone with some changes you did then. But a couple of months ago it startet to occur again.

Feedback: Since a task ID can't be re-used, how about leaving a "shadow" task in the original list for items that are removed, and requiring manual removal. These can be "locked" tasks, per a recent enhancement request for that feature. This points to how that feature can be implemented, where a task might be locked for different reasons, so perhaps a locked attribute can be set to an integer indicating why it's locked. Then someone can filter tasks that are locked for a specific reason, and remove them with a confirmation.

I'm VERY pleased to see that people are visiting the wiki[^], and that there are requests for updates on various pages. While the wiki is being updated every day, I haven't been updating the status notes in the README[^] because I thought most people already knew the status but I'll start updating this again.

I know what topics are missing and where pages are incomplete. Nothing has been forgotten, it just takes time to write content. Your ongoing patience and interest are appreciated. However your comments are all valued.

So I've created a new Suggestion Box[^] which will allow anyone to post wiki notes (not software change requests) to a central location so that your notes don't get missed. This is a public resource, no login required. I'm as curious as anyone to see how this works for us.

A Big Thank You for the suggestions already posted to the form. If you go to the Suggestion Box page on the wiki you'll see that I've transcribed suggestions thus far along with the status. The page will be updated when the suggested changes have been completed.

That's how it works. If you have other ideas for this, please comment here, or use the field in the Suggestion Box form to send a private note.

I created a custome attributs,for example Test,Data type is Text,List Type is Fixed data,singe-selection,default data are test1,test2.test3.test4.When I click the Test column for one task, the value of test attribute is setted test1,if you clicked again, the value was changed to test2(I has no any operation in edit field).I think it is a bug because user has no any operation on this attribute column like other attribute,for example Status,Cat. why the value was changed automatically?By the way,Is possible to set custome attribute filter?

It is meant to work like even though I can understand that it was confusing to you.

You will notice that the mouse cursor changes to a 'pointing hand' that indicates that clicking will cause an edit. And because this is a 'fixed list' the edit is to 'cycle' through the fixed items one by one.

Sorry if this has been asked before, but I searched for created date time and found nothing.

I was wondering why my titles have less space horizontally and I compared it with my previous version of this program and see that the reason why is because the Created column is longer because it is displaying the time along with the date that the task was created.

So, how can I show only the date and not the time for the Created / Creation Date column?

Also wanted to add that resizing that column hides the date instead of the time as if the contents of the column are right aligned. It would have been great if resizing covered up from right to left than left to right.

O.k. Thanks.Are you able to provide an estimated time as to when 7.1 will be released?

Also, is there anyway possible to make the text of each column left aligned so that when one makes a column's width smaller, the text from the left side can still be read, the same way in which it is possible in Excel if the contents of the columns are left aligned?

If this was already possible, I could have done this with Created column and not have to wait for a fix.