Transitioning the textdisplay( function to Panorama X

I received a private message from a Panorama 6 user that is using the textdisplay( function a lot, and is daunted by the task of converting these to Panorama X. I’m posting my reply here because this will probably be generally useful to other users – there is a relatively fast way to make the necessary conversion.

If you haven’t looked at this function, here is a link to the help page.

In Panorama 6.0 and earlier, the textdisplay( function had only two parameters: color and style. The text was included after the function, like this:

textdisplay(style,color) + text

Unfortunately, it was not possible to make it work the same way in Panorama X. You will have to go through all of your forms and modify any formula that uses the textdisplay( function, so that the text becomes the third parameter of the function, like this:


There is no automatic way to do this – you must manually locate and modify each formula. It’s a minor change, but if you have a lot of them, it will be tedious. If you were doing this in Panorama 6, you’d have to double click on each object to open the dialog, then edit the function, then press Ok. It would be really easy to miss one or more.

In Panorama X there is no dialog, so if you set the inspector panel to the Formula pane it is already going to be a bit quicker. But if you have dozens of these, I think there is a better way – use blueprints.

To illustrate this, I’ve created a simple form that uses a couple of Text Display objects.

Of course, with only two of these objects it would be easy to just edit the formulas in the inspector panel. But I’m going to do this using a blueprint.

I’ll start by using Command-A to select all the objects, then right clicking on any object and choosing Blueprint. (Note that it doesn’t matter if I select objects that don’t contain the textdisplay( function, all objects is fine.)

This opens the blueprint dialog sheet. Now I can press Command-F and search for textdisplay(

I can quickly go thru all the objects and fix the formulas.

When I’m done, I press the Update Form button. Voila! The textdisplay( functions are now working!

Note: If there were dozens of these objects in a form, it might be easier to copy the blueprint code into a procedure, like this:

I think the procedure window is a bit easier to work with for editing lots of text than the blueprint dialog sheet. When you are done you can either copy the code back into the blueprint sheet and press Update Form, or you can just run the procedure. If you do the latter, make sure the form is in data mode, not graphics mode, and make sure the correct form is active. If the wrong form is active, you’ll mess up whatever form is active. When you’re done, it would probably be a good idea to delete this procedure, to remove any chance of accidentally running it and messing up a form.

By the way, you might want to look into the new richtextdisplay( function. For me, this function has entirely replaced use of the textdisplay( function. I think it is easier, and much more powerful – allowing multiple styles, fonts, colors, even the use of icon fonts, including Font Awesome, which is built into Panorama X. But this is all a post for another time.