Buttons that work in preview mode 
Author Message
 Buttons that work in preview mode
Is it possible to have buttons that work in preview mode?

I'm currently pausing a script in preview mode, on the report layout.  When
the user continues with the script, I show a message asking them if they
want to print or cancel.

I would like to have print, cancel & page navigation buttons on the layout
that the user can use in preview mode, is this at all possible?

TIA
Ian



Tue, 08 Feb 2005 22:48:53 GMT
 Buttons that work in preview mode

Here is the text of an unpublished article that details several methods for
providing button functionality in preview mode (technique file available on
request).  

Navigating Pages in Preview Mode

? 2002 M. Bridget Eley

Navigating pages in Preview Mode is ordinarily handled using the navigation
book in the Status Area.  By clicking the top or bottom page of the book,
you can navigate back or forth through the pages.  Dragging the bookmark
allows you to advance quickly to any position.  You can even jump to a
particular page number by selecting the number immediately below the book,
typing the page number you want to go to then pressing Enter.

But what if you don't want to reveal to the Status Area?  This can be quite
challenging because regular buttons do not work in Preview Mode, so you
cannot create navigation buttons that go to the first page, previous page,
next page or last page as you could with records in Browse Mode.  Here are 3
methods for working around these limitations, each with their own advantages
and disadvantages.  Please note that I have left the Status Area visible but
none of the techniques relies on it being visible in the first instance.

Method 1

The only buttons that do work in Preview Mode are the Continue and Cancel
buttons that appear in the Status Area when a script is paused, which open
the possibility of scripting some rudimentary navigation system.

Browse Record:

Show Message [Buttons: 3OK2, 3Click Continue or press Enter to move forward
through pages.  Use scroll bars to scroll right or down.  Click Cancel or
press Command-period to return to Browse Mode.2]
Enter Preview  Mode []
Go to Record/Request/Page [First]
Loop
Pause/Resume []
Go to Record/Request/Page [Exit after last, Next]
End Loop
Enter Browse Mode []

Advantages:
1. Easy to set up
2. Low overhead

Disadvantages:
1. No backward navigation.
2. Requires scrolling to see parts of pages not visible on screen.
3. Must choose between disabling Cancel button in Status Area (using Allow
User Abort [Off]) in order to maintain tight control over the script's
outcome, which means that the user then has to work through all records when
a sampling would have been sufficient, or leaving the Cancel button in the
Status Area at the risk of stranding the user in the layout.

Method 2

When a page is copied in Preview Mode, the entire page is copied to the
clipboard as an image.  Method 2 takes advantage of this lesser know fact by
looping through the pages, copying each page in turn then pasting it into
the container field in a newly created record in a special purpose 3Preview2
file.  Because these images can be displayed as records in Browse Mode,
ordinary navigation buttons can be created and used. On return to the main
file, all records in the Preview file are deleted.

Preview Mode

Enter PreviewMode[]
Go to Record/Request/Page [First]
Loop
Copy  [Select]
Perform Script [Subscript, External: Preview (Create Page)]
Go to Record/Request/Page [Exit after last, Next]
Exit Record/Request
End Loop
Enter Browse []
Perform Script [Subscript, External: Preview (Show Preview)]

External scripts in Preview file:

Show Preview

Go to Record/Request/Page[First]

Done

Find All
Delete All Records [No Dialog]
Perform Script [Sub-script, External: Main File (Method 2)

(where Method 2 = Go to Layout [Method 2])

Advantages:
1. Allows freedom to move backwards and forwards, jump ahead or cancel at
any time.
2. scripts can be adapted to create a method for permanently archiving
reports.

Disadvantages:
1. copying and pasting large numbers of pages is time consuming and
temporarily bloats the file size of the Preview file.
3. page down button causes the button bar to disappear off screen. The
workaround is to place another set of buttons (with Page Up instead of Page
Down) in such a way that it appears to be the same button bar.  The trouble
with this is that with most paper sizes, both button bars would be visible
when the Page Up button was pressed.  The work around for this using JMO's
visibility trick (see below):  The drawback for this is that you can include
conditional beeps for first and last records.

JMO's visibility trick:  the two button bars can be made to alternately
appear and disappear by placing them in two single row portals with
invisible border and fill, based on two relationships:

1.  between a gShowButtonBar1 (=global number field) on the left and
Constant1 (= number field, auto-entered 1) on the right.

2.   between a gShowButtonBar2 (=global number field) on the left and
Constant2 (= number field, auto-entered 2) on the right.

Ensure that neither relationship is set to allow creation of related
records.

Make the 3Page Down2 script set  set gShowButtonBar1 to nothing and
gShowButtonBar2 to 2.

Make the 3Page Up2 script set  set gShowButtonBar2 to nothing and
gShowButtonBar1 to 1.

Place the first portal and its button bar at the top right of the layout.
Place the second portal and its button bar in the exact location that the
cursor shifts to when the Page Down button is clicked.  When the Page Down
Button is clicked, the first button bar will disappear as the page scrolls
down, and the second button bar will appear, seemingly in the same postion
that the first button bar was in.  The Page Down button will appear to
change to a page up button.

Method 3

Method 3 also makes use of an extra file, in this instance to create a
palette of navigation buttons that can be used to navigate through the pages
of the found set of the Main File in Preview Mode.

New fields in Main File:

Global Number = Page#
Global Number = Last Page

Scripts in Main File

Open Page Navigator

Open [Page Navigator]

First Page

Enter Preview Mode[]
Go to Record/Request/Page [First]

Next Page

Freeze Window
Enter Preview Mode[]
Set Field [Page#, Status(CurrentPageNumber) + 1]
Go to Record/Request/Page [Last]
Set Field [Last Page, Status(CurrentPageNumber)]
If [Page# > Last Page]
Beep
Else
Go to Record/Request/Page [Page#]
End If

Previous Page

Enter Preview Mode[]
Set Field [Page#, Status(CurrentPageNumber) - 1]
If [Page# < 1]
Beep
Else
Go to Record/Request/Page [Page#]
End If

Last Page

Enter Preview Mode[]
Go to Record/Request/Page [Last]

(NB: all these scripts can also be activated by keyboard shortcuts 1 through
5, directly from within the main file)

Scripts in Page Navigator

First Page

Perform Script [Sub-script, External, Main File (First Page)]
Exit Record/Request

Next Page

Perform Script [Sub-script, External, Main File (Next Page)]
Exit Record/Request

Previous Page

Perform Script [Sub-script, External, Main File (Previous Page)]
Exit Record/Request

Last Page

Perform Script [Sub-script, External, Main File (Last Page)]
Exit Record/Request

(The Exit Record/Request script step in each of the Page Navigator scripts
ensures that the Page Navigator remains on top)

Create a button for each script, place them one under the other directly
under the top left corner, re-size the layout to the exact dimensions.

All that is left is to use the first keyboard shortcut to bring up the Page
Navigator.

Advantages:
1. The navigation palette is tiny and inconspicuous.
2. It floats over previews and can be moved to a position where it does not
obscure any part of them.
3. It stays in the same position when viewing top and bottom of page
4. It can be configured to display buttons for a variety of functions
including navigation through pages, movement up and down the page, toggling
zoom level, returning to Main File, and so.
5. Its pop-up effect has a professional look and feel.

Disadvantages:
1. Users who are not experienced with using FileMaker may become lost if
they accidentally click on the Main File in the background causing it to
come to the front and the Page Navigator to seemingly disappear.  Because
Main File is in Preview Mode, all the buttons have become inactive (and in
this case, invisible too) making it difficult for a novice to know how to
get out of the layout.

Method 3 was first published on comp.databases.filemaker as 3Re: Turning
Pages In Preview Mode2 by Bridget Eley on March 12, 2002.  It was inspired

was adaptation of a technique described in an earlier post "Re: Navigating
in Preview Mode" by Howard Schlossberg on March 1, 2002.  The visibility
technique was originally created by John Mark Osborne.

--
Bridget Eley


on 8/24/02 12:48 AM:

Quote:
> Is it possible to have buttons that work in preview mode?

> I'm currently pausing a script in preview mode, on the report layout.  When
> the user continues with the script, I show a message asking them if they
> want to print or cancel.

> I would like to have print, cancel & page navigation buttons on the layout
> that the user can use in preview mode, is this at all possible?

> TIA
> Ian



Wed, 09 Feb 2005 10:04:06 GMT
 Buttons that work in preview mode
If your working Windows I do a navigation app that allows the interaction
mentioned. mail me off channel if interested.
PK

Quote:
> Is it possible to have buttons that work in preview mode?

> I'm currently pausing a script in preview mode, on the report layout.
When
> the user continues with the script, I show a message asking them if they
> want to print or cancel.

> I would like to have print, cancel & page navigation buttons on the layout
> that the user can use in preview mode, is this at all possible?

> TIA
> Ian



Fri, 11 Feb 2005 18:51:14 GMT
 Buttons that work in preview mode

Quote:

>Is it possible to have buttons that work in preview mode?

>I'm currently pausing a script in preview mode, on the report layout.  When
>the user continues with the script, I show a message asking them if they
>want to print or cancel.

>I would like to have print, cancel & page navigation buttons on the layout
>that the user can use in preview mode, is this at all possible?

I took one of my solutions to the office and a colleague looked at it.
I was able to walk her through it in the spots that weren't obvious
(I've written this db for myself and haven't much in it
explanation-wise).  Also, she's new to FMP and I get the feeling
perhaps new to db apps in general.  I know that I want to share my
solution once it's done (as freeware, though) so I now know that I
must really finetune it so that it's more straightforward for anyone
coming at it fresh.

I realized that having a print button in preview mode would be a big
boon.  She'd go into the reports mode and she wondered why she could
only see "one record".  I pointed out the preview button to her but
then she was clicking into the preview screen.  I currently have the
reports scripts accessing each report layout in browse mode.  It might
be much easier to set it to preview, but only if the print button is
available.  Anyway, on talking it over with her and getting her
impressions, I get the feeling that if there were either of the two
items below, this would eliminate possible confusion:

1)  have a print button available in the preview mode, or
2)  have an Access-like screen that shows more than one record but
when in browse mode in each reports layout.  Browse mode has all the
buttons so this would be a good solution, but don't know if it's
possible.

Secondly, are tooltips possible in FMP solutions?  I'd like to put
them on the buttons so that when mouse pointer is hovering over, they
show up.  I plugged in "tooltip" in the search in help file and
nothing came up.

Thanks muchly!



Wed, 02 Mar 2005 09:10:24 GMT
 Buttons that work in preview mode
Win or Mac?
If Win then I have buttons that do what you want.(vb)
ToolTips are on the wish list I would suspect of every FM dev in the world.
Instead we get a nod towards it with that hand (lol) I've been waiting four
versions for tooltips along with mouse down mouse over mouse up mouse out
etc FMs great but no tab order for buttons? the interface which is so easy
to build has some sad omissions and is now getting dated.
PK

Quote:

> >Is it possible to have buttons that work in preview mode?

> >I'm currently pausing a script in preview mode, on the report layout.
When
> >the user continues with the script, I show a message asking them if they
> >want to print or cancel.

> >I would like to have print, cancel & page navigation buttons on the
layout
> >that the user can use in preview mode, is this at all possible?

> I took one of my solutions to the office and a colleague looked at it.
> I was able to walk her through it in the spots that weren't obvious
> (I've written this db for myself and haven't much in it
> explanation-wise).  Also, she's new to FMP and I get the feeling
> perhaps new to db apps in general.  I know that I want to share my
> solution once it's done (as freeware, though) so I now know that I
> must really finetune it so that it's more straightforward for anyone
> coming at it fresh.

> I realized that having a print button in preview mode would be a big
> boon.  She'd go into the reports mode and she wondered why she could
> only see "one record".  I pointed out the preview button to her but
> then she was clicking into the preview screen.  I currently have the
> reports scripts accessing each report layout in browse mode.  It might
> be much easier to set it to preview, but only if the print button is
> available.  Anyway, on talking it over with her and getting her
> impressions, I get the feeling that if there were either of the two
> items below, this would eliminate possible confusion:

> 1)  have a print button available in the preview mode, or
> 2)  have an Access-like screen that shows more than one record but
> when in browse mode in each reports layout.  Browse mode has all the
> buttons so this would be a good solution, but don't know if it's
> possible.

> Secondly, are tooltips possible in FMP solutions?  I'd like to put
> them on the buttons so that when mouse pointer is hovering over, they
> show up.  I plugged in "tooltip" in the search in help file and
> nothing came up.

> Thanks muchly!



Wed, 02 Mar 2005 19:41:31 GMT
 Buttons that work in preview mode


Quote:

>>Is it possible to have buttons that work in preview mode?

>>I'm currently pausing a script in preview mode, on the report layout.  When
>>the user continues with the script, I show a message asking them if they
>>want to print or cancel.

>>I would like to have print, cancel & page navigation buttons on the layout
>>that the user can use in preview mode, is this at all possible?

[snip]

Quote:
>I realized that having a print button in preview mode would be a big
>boon.  She'd go into the reports mode and she wondered why she could
>only see "one record".  I pointed out the preview button to her but
>then she was clicking into the preview screen.  I currently have the
>reports scripts accessing each report layout in browse mode.  It might
>be much easier to set it to preview, but only if the print button is
>available.  Anyway, on talking it over with her and getting her
>impressions, I get the feeling that if there were either of the two
>items below, this would eliminate possible confusion:

[snip]

No print button possible in preview?



Sun, 06 Mar 2005 18:18:25 GMT
 Buttons that work in preview mode
What most people do is to set up a script to go to the Preview (Same layout
or different no odds), Pause then goto browse mode (when "enter" is
clicked), if you add a print step with a message saying "Print Records" or
whatever with "Yes" and "No" buttons then the user gets the option to Print
or not,  you can set this up as the preview is entered and add a "Pause for
0 0 0 Seconds" that allows the preview to show then the message comes up.
Not toally satisfactory but workable
PK


Quote:



> >>Is it possible to have buttons that work in preview mode?

> >>I'm currently pausing a script in preview mode, on the report layout.
When
> >>the user continues with the script, I show a message asking them if they
> >>want to print or cancel.

> >>I would like to have print, cancel & page navigation buttons on the
layout
> >>that the user can use in preview mode, is this at all possible?

> [snip]

> >I realized that having a print button in preview mode would be a big
> >boon.  She'd go into the reports mode and she wondered why she could
> >only see "one record".  I pointed out the preview button to her but
> >then she was clicking into the preview screen.  I currently have the
> >reports scripts accessing each report layout in browse mode.  It might
> >be much easier to set it to preview, but only if the print button is
> >available.  Anyway, on talking it over with her and getting her
> >impressions, I get the feeling that if there were either of the two
> >items below, this would eliminate possible confusion:

> [snip]

> No print button possible in preview?



Sun, 06 Mar 2005 21:40:49 GMT
 
 [ 7 post ] 

 Relevant Pages 

1. Can you put a working button in PREVIEW mode

2. Buttons in Preview mode?

3. Continue Button in Preview mode while in a script

4. Preview button on Transform Data Task

5. Help, Lost the printer button in report preview

6. VFP3 - Print Preview Toolbar [PRINT] button?

7. Pressing print button on preview toolbar problem

8. Page setup and preview mode

9. creating jpegs of reports using copy in preview mode

10. How does user get out of Preview mode?

11. Enter preview mode (pause)

12. Turning Pages In Preview Mode


 
Powered by phpBB® Forum Software