Print Preview 5

Over the last few days, I have been copying everything relevant from the beta Script Display form to the production Print Preview form. In the process, I have copied many of the same controls, and added two new ones. I have also encapsulated the GDI+, rendering and data source classes into its own container class, and placed the class into the form.

I have added just enough code for the form to be able to display itself, and here it is in its first operational version:

printpreview5-06-18-2009

Can you spot what’s wrong with this form? The “No Preview” panel should read “Please Wait A Moment” instead of “Click View Results.” No matter; that’s a trivial change.

As you can see, the new form follows the original script rendering form fairly closely. The preview from file and preview from form buttons have been eliminated, and replaced with a page selection combo box. A new button, “Test,” has been added that will be visible only when the form is operating in test mode. All the other controls are exactly the same; the zooming, centering and reset buttons are the same, and the panning sliders are the same.

The next step is to begin to connect all the controls so that it can produce useful results. I will be testing this form in FoxPro’s IDE for the time being, and will be taking this whole process very slowly. Note that the script rendering code has never been used to produce more than one page at a time, and this form will have to produce three pages in succession. So I will be testing multiple page creation, and new code that will be added to allow choosing from those pages.

I will also have to add what I call the “double-click” code. This code was a part of the original Print Preview form. When the user double-clicks on a field, HUD-1 will bring up the originating data field from the source. If the data came from a form that is open, the focus will switch to that form, and if the data came from a file, the file will be opened in a new form. The great part about this is that the double-clicked field will then be highlighted in the displaying form, ready to be edited if the user desires.

All that will have to be added over the next few weeks. My target for getting this all working and releasing this as the next operational version of HUD-1 is by the end of July.

Comments are closed.