ViewShowDummy Method

Build 1501 on 14/Nov/2017  This topic last edited on: 23/Mar/2016, at 12:16

Description

Enables "template page preview" in Fred, filled with dummy texts and pictures.

To achieve such view on the current page, on the View menu, select Template preview.

Syntax

Page.ViewShowDummy int1()

int1

0 = show , 1 = hide, 2 = toggle

Return value

Returns error code.

Remarks

When such view is enabled, all the linked frames in the page, and also all unlinked frames with associated TOOL parameters specifying a format and linking to a text or an article in the page, are filled with dummy text. This dummy text will be generated as by the Ted.InsDummyText command when called with an empty parameter. Note that the text contained in the articles will not be touched: the dummy text is generated on the fly and used only for displaying the page.

When display with dummy is enabled all the pictures in the page will be displayed using dummy pictures loaded from the GN_DUMMY sub-directory of the global directory. This will happen regardless of the state of the pictures on page: dummy, to be updated, ready etc.

The GN_DUMMY directory can contain any number of pictures in TIFF, JPEG, GIF or EPS format. When displaying picture with dummy Fred will automatically choose the most appropriate dummy picture from those available in the GN_DUMMY directory: if the page is a color page color pictures will be preferred over b&w ones and vice-versa, if multiple pictures will still be available the one with an aspect ratio most similar to the picture in page will be chosen.

It is possible to select dummy pictures also based on title and type: to indicate that a dummy picture is associated with a specific title or type just put the title or type name (or both) in the picture name delimited with spaces or dashes or dots (e.g. 'tera-photo.jpg' is specific to the title Tera and the type photo). Dummy pictures for titles different than the page one will be ignored. Dummy pictures for types different than the picture to be replaced will be ignored. Dummy pictures for the specific title or type will be preferred over 'generic' (i.e. without type) ones.

Added a 'print dummy texts and pictures' option to the print dialog. When selected the page(s) will be printed using dummy texts and pictures as specified above.

Example

 '<ShellCommand(CanExecute:="Ena_IsWindowActive", IsChecked:="Chk_IsViewShowed")> _

  Public Sub ViewShowDummy()

    Page.ViewShowDummy(SwitchToggle)

  End Sub

Context

Page designer