In the latest version of MO71, released mid-April, a new feature was added to list dialog filters.
In older versions of MO71, you could add an additional column to the list dialog by creating a user variable in a filter. In the example filter below, a user integer variable (using the ‘@’ symbol) called ‘fullness’ is created, and is shown as a column (using the ‘#’ symbol).
This would result in a column with heading ‘fullness’ containing the calculated value.
A user column using a user variable marked with ‘#’ symbol
With the new User Column feature, there are now many more things you can do with your own created columns. Let’s make the same column with the new feature first, and then build on it.
The first thing to note is the heading of the column (parameter 1) is a quoted string, rather than just being the name of the variable. This means that you can have spaces in the heading title. So I’ll change it to “Queue Fullness” just to take advantage of that. Parameter 2 of the usrcol() function is the same expression we previously assigned to our user variable. Parameter 3 is left-aligned text – hinting that there might be other displays instead of text. Let’s try one now.
You’ll see we have a bar graph instead of the text now. We can change the colour it is displayed in, but I’ll come back to that in a moment.
A basic bar chart with user columns
In the above example, we’ve calculated the percentage of current depth to maximum depth ourselves with the expression curdepth/maxdepth*100. However, using the usrcol() function, we can let it do the work. The fourth parameter gives the maximum value to be used with a chart, which defaults to 100 if not supplied. Let’s re-write our filter as follows:-
The fifth parameter to the usrcol() function is the colour of the graph, so let’s liven up this chart a bit. Colours can be specified as one of a selection of fixed colour names, as an RGB value, or as any of the colours in your colour scheme, including four new user colours (go to menu View->Set Colours… and scroll to the bottom to see these). I’m going to use my 3rd user colour.
Colouring a user column bar chart
If you like bar graphs to get a good at-a-glance view of what is going on, but still want to see the numbers as well, you can combine both the bar and text options together. In this graph I’m more interested in the percentage value used for the graph since I already have the current depth shown in another column, so I’ll make my filter as follows:-
I’m tempted also to make the text a little smaller in the chart, and position it on the left (I have the choice of left, centre or right; and top or bottom for positioning text).
User column with a bar chart and overlaid smaller text
I’ve got quite a small dialog window here, but in practice you might have many more columns and thus less space assigned to your bar chart column. While you can of course alter the width of the column manually, you can also use one of the width options to show you want it to be wider and more striking on your display.
In this example my bar graph is just on the end of the columns that were already there, but it is also possible to position your user column using the existing showcol() function. For example, I could update my filter to the following:-
showcol("Queue Fullness",2);usrcol("Queue Fullness",curdepth,bar+text+percent+left+small+w40,maxdepth,CLR3)
User columns can be moved using the showcol() function
There’s lots more you can do with User Columns – more than can fit into one blog post, so watch this space, or if you can’t wait, take a peek at the MO71 User Manual where there’s a large section about them.
The new version can be downloaded from the MO71 Download Page. Any current licensed users of MO71 can run the new version on their existing licence. If you don’t have a licence and would like to try out MO71 then send an email to email@example.com and a 1-month trial licence will be sent to you.