Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

I start with a blank window:

Image RemovedImage Added

I need to change the window name from the default. I right-click anywhere in the window (the caption bar is handy) and choose Description. From that dialog I can change the Logical name:

Image RemovedImage Added

The toolbar

I need to add a Floating Toolbar to the Window (I will go over adding the buttons as I go along).

I use the Insert->Toolbar menu to create the toolbar. I set the position to Floating, and I also set the authorized positions to only floating as I do not want this to be a dockable toolbar.

Image RemovedImage AddedImage Removed

Image Added

Image RemovedImage AddedImage Removed

Image Added

That will create a toolbar window that can be positioned separately from the viewer window. I set the toolbar's name to TBAR_Navigation.

...

I also need an image control (called IMV_View) that is using all the space of the window. Here's what my window looks like:

Image RemovedImage Added

I set the display mode for the image to Homothetic without increasing size, high quality, position to top left, and anchoring to grow both in height and width. These settings assure that the document will always fit the screen when first opened and also whenever the window is resized.

Image RemovedImage AddedImage Removed

Image Added

Now that I have the general housekeeping done let’s get to the coding!

...

For the report procedure I create a report with no margins and just a body block. I set the background of the Report to the blank PDF mentioned earlier, and set it to use page 1.

Image RemovedImage AddedImage Removed

Image Added

In the opening code of the Report I redefine the procedure to accept the two parameters that I am going to pass (the Document File Name and Number of Pages), I also change the background image to the document file passed. You should notice that although I set the background image on the Report properties, the run-time property is actually associated with the Body block.

...