home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Black Box 4
/
BlackBox.cdr
/
genapps
/
hp22dc.arj
/
USRGUIDE
/
PADPGBTN.TXT
< prev
next >
Wrap
Text File
|
1991-05-16
|
35KB
|
945 lines
________________________________________________________________________
Chapter 12: Manipulating Pads, Pages, and Backgrounds 191
________________________________________________________________________
CHAPTER 12: MANIPULATING PADS, PAGES, AND BACKGROUNDS
A pad is an application created with HyperPAD. HyperPAD is especially
suited for designing certain types of applications, including
information systems like tutorials and help, flat-file databases, and
front ends. All of the applications that come with HyperPAD are pads.
This chapter defines a pad and describes how to perform some basic pad
functions, including creating a pad, setting a pad's protection, and
making a copy of a pad. This chapter also introduces pages and
backgrounds, the major components of a pad, and describes how these
elements fit together.
WORKING WITH PADS
In the following section, you'll learn how to work with pads.
Specifically, you'll learn some basic pad-maintenance tasks such as how
to:
0 Save a copy of a pad
0 Access information about a pad
0 Add pages and backgrounds to a pad
0 Protect a pad
0 Remove extra space from a pad
0 Create pads
________________________________________________________________________
Chapter 12: Manipulating Pads, Pages, and Backgrounds 192
________________________________________________________________________
GETTING PAD INFORMATION
As a pad author, you may need certain information about your pad, such
as how many pages and backgrounds the pad has and the amount of disk
space the pad requires.
To access information about the current pad:
1. Access the pad you want information about.
2. Make sure the user level is set to painting or higher.
3. Select Pad Info from the Objects menu (ALT+O, D).
The following dialog box is displayed on-screen:
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
The Pad Info dialog box lets you:
0 Change the name of the pad.
0 See important information about the pad.
0 Access the pad's script. (Scripts are discussed in Chapter 14.)
________________________________________________________________________
Chapter 12: Manipulating Pads, Pages, and Backgrounds 193
________________________________________________________________________
The dialog box includes the following information:
0 The pad's name (which you can alter).
0 The location of the pad on your hard disk.
0 The number of backgrounds in the pad.
0 The number of pages in the pad.
0 The size of the pad in bytes. (This is helpful in determining
whether a pad will fit on a drive.)
0 The amount of free space the pad contains. Free space can be
removed from the pad to decrease its size. (See "Compressing
Pads" below.)
CHANGING THE NAME OF A PAD
From the Pad Info dialog box, described above, you can change the DOS
name of the pad. Simply type the new name into the Pad name text box and
press ENTER. You will receive an error message if you specify the name
of an existing pad or the new name is invalid.
SAVING A COPY OF YOUR PAD
Oftentimes during pad development you may want to try out a new design
or change the look of some button or field as a test. Since HyperPAD
saves everything, it is a good idea to first make a backup copy of the
pad so that you can return to the original if you accidentally delete or
modify something.
________________________________________________________________________
Chapter 12: Manipulating Pads, Pages, and Backgrounds 194
________________________________________________________________________
To save a copy of a pad:
1. Select the Save a Copy command from the File menu (ALT+F, S).
The following dialog box is presented on-screen:
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
HyperPAD presents the current pad's name in the dialog box, but with a
.BAK extension.
2. If you want to save the pad under a different name, just BACKSPACE
over the name and type in a different one. You can specify the full DOS
path name of the pad, including a different drive letter and directory
if necessary.
3. Press ENTER or select <<Ok>>.
PROTECTING PADS
Suppose you have a pad containing sensitive business information or your
bank account information. These types of pads can be password-protected
to guard your sensitive information from prowlers.
In another instance, you might want the pad to be viewed by other
people, but you don't want the structure changed. Also, you may want to
protect your pad-development secrets from other users. All these things
can be accomplished by setting a password.
________________________________________________________________________
Chapter 12: Manipulating Pads, Pages, and Backgrounds 195
________________________________________________________________________
Finally, suppose you want a pad to be public to many users, but you
don't want it modified. For example, you may have a pad explaining
company policy that you want to give to all of your employees. You can
protect a pad from inadvertent modification by making it read-only.
These forms of pad protection are:
0 Setting the user level so that certain tools are not available
0 Setting a password so that the user level cannot be modified
0 Setting the pad to read-only so that it can be examined but not
modified
0 Password-protecting the pad so that it can only be accessed if
you know the password
Pads are protected using the Protect command on the File menu. When you
select this command, the Protect dialog box appears on-screen:
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
To access the Protect dialog box:
1. Select the Protect command from the File menu (ALT+F, T).
If the user level is set to browsing or typing, you'll have to press the
special key combination (SHIFT+ALT+F) to open the File menu.
2. If a password is set, you'll have type the correct password and
press ENTER.
________________________________________________________________________
Chapter 12: Manipulating Pads, Pages, and Backgrounds 196
________________________________________________________________________
SETTING THE USER LEVEL
The user level determines the capabilities and commands available to the
user. The available user levels are summarized in the following table:
User level: Allows you to:
-----------------------------------------------------------------
Browsing Click on buttons
Typing Type into fields
Painting Paint on the page or background using the painting
tools
Authoring Access the script of buttons, fields, pages,
backgrounds, and the pad
Each higher user level provides you with additional capabilities,
including all of the capabilities of the previous levels.
If you set the user level to browsing or typing, HyperPAD displays the
short form of the File, Edit, and Workspace menus. Furthermore, the
Objects and Block menus do not appear on the menu bar.
When the user level is set to typing or browsing, the Protect command
will not appear on the File menu. In this case, to access the Protect
command, press SHIFT+ALT+F. This safety check prevents casual users from
inadvertently changing the user level.
SETTING A PASSWORD
Setting a password restricts access to the Protect dialog box. If a
password is set, you cannot access the Protect command on the File menu
without supplying the correct password.
This is useful if you want to restrict the user's capabilities and
prevent knowledgeable users (who may know about the Protect command!)
from changing the protection.
________________________________________________________________________
Chapter 12: Manipulating Pads, Pages, and Backgrounds 197
________________________________________________________________________
To set a password:
1. Select the Protect command using the procedure described above.
2. Press ALT+S to set a password.
The Set Password dialog box appears on-screen.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
3. Type your password and press ENTER.
________________________________________________________________________
Chapter 12: Manipulating Pads, Pages, and Backgrounds 198
________________________________________________________________________
After you type your password, the Verify new password dialog box is
placed on-screen:
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
4. Verify your new password by retyping it, then press ENTER.
After you type in your password for the second time, HyperPAD returns
you to the current page. Be sure to remember your password because there
is no way to access the Protect dialog box (and change your password)
without it.
Setting a new password replaces the previous password, if there is one.
To remove a password (assuming one is set):
1. Select the Protect command using the procedure described above.
2. Press ALT+S to select the Set Password command.
The Set Password dialog box is placed on-screen.
3. Press ALT+N to select the None command. This removes any password
and returns you to the page.
PASSWORD-PROTECTING A PAD
Password-protecting a pad restricts access to it, requiring a user to
know the password in order to open the pad. This option is useful for
preventing pads containing sensitive data from being accessed by
unauthorized users.
________________________________________________________________________
Chapter 12: Manipulating Pads, Pages, and Backgrounds 199
________________________________________________________________________
If a pad is password-protected, you will be asked for the password only
the first time you open the pad during each HyperPAD session.
Thereafter, you can access the pad without entering the password.
To password-protect a pad:
1. Select the Protect command, as described above.
2. Set the Password Only option on.
3. Select Ok (ALT+O).
You won't be able to see the effects of this option until you exit, run
HyperPAD, then open the pad.
READ-ONLY PADS
Read-only pads cannot be modified. The user is prevented from typing
into fields, painting, changing objects, or performing any other
activity that would modify the pads.
Because read-only pads can't be modified, more than one user on a
network can browse a pad at the same time. For example, if your company
policy were described in a pad, you could set the read-only option and
place the pad in a directory on a network. In this manner, many users
could access the policy at the same time. (This option requires DOS 3.0
or higher.)
To set a pad to read-only:
1. Select the Protect command using the procedure described earlier.
2. Set the Read-only option to on.
3. Select Ok.
COMPRESSING PADS
You may have noticed that the Pad Info dialog box contains a Free Space
otion, which reports the number of bytes of free space within the pad.
Free space accumulates while you're modifying or creating pads.
As you use your pad, HyperPAD objects change size and empty spaces form
within the disk file. These spaces are used, resized, and emptied as
needed while you're working with the pad. In fact, HyperPAD manages free
space in your pad without your knowing it. However, to conserve disk
space, HyperPAD gives you the ability to remove all the free space in
the pad.
________________________________________________________________________
Chapter 12: Manipulating Pads, Pages, and Backgrounds 200
________________________________________________________________________
To remove the free space in a pad:
1. Select the Pad Info command from the Objects menu (ALT+O, D) and
check the free space. (The user level has to be set at least to
Painting.)
The free space is shown in the Pad Info dialog box. It is not especially
useful to compress a pad to recover a small number of bytes. However, if
there is a large amount of free space, compressing the pad can improve
the pad's performance.
2. Select Compress from the File menu.
A message indicating the status of the compress is displayed during the
compression process.
Pad compression requires twice the disk space of the original pad. For
example, if the size of the pad is 10,000 bytes, to compress the pad you
will need 10,000 free bytes of space on your disk.
CREATING A NEW PAD
When you first begin designing, you may start by customizing your
existing pads by adding paint, buttons, and fields to enhance their
functionality. However, you may eventually decide that you want to begin
an application entirely from scratch.
It's a good idea to create a new pad whenever you want to explore
features of HyperPAD with which you're unfamiliar. This provides a
"clean slate" on which to experiment with the painting and object-
manipulation tools.
To create a new pad:
1. Select the New command from the File menu (ALT+F, N).
________________________________________________________________________
Chapter 12: Manipulating Pads, Pages, and Backgrounds 201
________________________________________________________________________
The New Pad dialog box will appear on-screen:
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
2. Type a new pad name into the New pad name text box. The name cannot
exceed eight characters. HyperPAD assumes a .PAD file extension.
Include the entire path name of the new pad if the directory listed in
the dialog box is incorrect.
3. If you want the new pad to be created with a copy of the current
background, select the Keep current background option.
Setting this option allows you to create a new pad that uses the current
background as a template for the new pad. For example, to quickly create
a database pad similar in structure to the Phone pad, you would first go
to the Phone pad, then select the New command from the File menu and set
this option.
4. If you want to alter the number of lines that are displayed on the
screen, set the Screen mode option to either 25, 43, or 50 lines.
You can only set these options if you have an EGA or a VGA video card.
Select the 25 lines option to create pads compatible with all systems.
5. Select <<Ok>> to accept your selections and create a new pad.
The new pad consists of a blank background and a blank page.
________________________________________________________________________
Chapter 12: Manipulating Pads, Pages, and Backgrounds 202
________________________________________________________________________
WHERE TO GO FROM HERE
Your next step depends on the type of pad you want to create.
If you intend to create a database, for example, you should proceed to
the section on "Working with Backgrounds" later in this chapter. This
will help you understand how the background defines your database
structure.
If you intend to create an information system, you might want to begin
by creating some additional blank pages and then begin to place
information on those pages. Thus, you should proceed to the next
section, "Working with Pages."
WORKING WITH PAGES
Pages contain most of a pad's information. Together with their
associated backgrounds, they define the structure of your pad. This
section examines pages in detail, including how to create, copy, paste,
and delete them.
As a browser, you used pages to hold information in your database pads.
Additionally, as an author, you will use pages to display paint, text,
buttons, and fields.
PAGE INFO
As a pad author, you may need information about a particular page, such
as how many buttons and fields are on the page, the name of the page,
and its page number within the pad. You'll find some of this
information, such as the name and number of the page, on the status bar.
Here's how to get additional information.
To access information about the current page:
1. Navigate to the page you want information about. (You can use the
PGUP or PGDN keys to pinpoint the page.)
2. Select the Page Info command on the Objects menu (ALT+O, P). (Make
sure the user level is set to Painting or higher.)
________________________________________________________________________
Chapter 12: Manipulating Pads, Pages, and Backgrounds 203
________________________________________________________________________
The Page Info dialog box is placed on- screen.
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
Using the Page Info dialog box, pictured above, you can:
0 Change the name of a page.
0 Determine important information about the page, including the ID,
which page it is, and the number of buttons and fields contained
on the page.
0 Access the page's script. (See the PADtalk Reference Guide for
more details.)
0 Change the status of a page so that it can't be deleted.
CHANGING THE NAME OF A PAGE
The page name helps you distinguish which page you're currently viewing.
The name of the page along with the page number always appear on the
status bar. You might choose a name that best reflects the purpose of
the page. For example, if the page contains information about today's
appointments, you might name it "Appointments for 5/12/90."
________________________________________________________________________
Chapter 12: Manipulating Pads, Pages, and Backgrounds 204
________________________________________________________________________
To change the name of the page:
1. Access the Page Info dialog box using the above procedure.
2. Type the new name into the Page name text box.
3. Press ENTER.
You can use the name to refer to a page in PADtalk. (See the PADtalk
Reference Guide.)
PROTECTING A PAGE
You can protect a page from being deleted by checking the No delete
option in the Page Info dialog box. Since HyperPAD can't undo the Delete
Page command, you can use this safety feature to prevent any mistakes.
For example, if there is a name in your Phone pad that you don't want
removed, you can set this option.
REDESIGNING THE PAGES IN A PAD
This section describes how to copy, paste, and delete pages in your pad.
These commands not only provide you with a way of reorganizing the pages
in your pads, but they also give you a way to get new pads up and
running quickly.
If you want to create a new pad borrowing some buttons, fields, or paint
from an existing pad, then use the Copy Page command to copy the page
from the existing pad and paste it into the new pad. Once the page is
pasted, you can then modify the paint and objects, tailoring the page
for your own needs.
The Copy Page, Cut Page, and Paste Page commands are only available when
the user level is set to painting or higher. The Delete Page command is
available at all user levels.
COPYING PAGES
When you copy a page in HyperPAD, you copy everything you see on screen,
including the page's background and all of the buttons and fields.
________________________________________________________________________
Chapter 12: Manipulating Pads, Pages, and Backgrounds 205
________________________________________________________________________
To copy a page:
1. Set the user level to painting or higher.
2. Navigate to the page you want to copy. You may have to use the PGUP
or PGDN keys to find the page you want.
3. Select the Copy Page command from the Edit menu (ALT+E, O).
A copy of the current page is placed on the clipboard.
If there was anything previously in the clipboard, the copied page will
replace it. If you want to retrieve the copied page, use the Paste Page
command.
Every time you copy a page, the background used by that page is also
copied. Thus, when you paste the page into a different pad, the
background is pasted, too.
CUTTING PAGES
The Cut Page command copies a page to the clipboard, then deletes it
from your pad. Everything on the page, including all of the buttons and
fields, is copied also.
To cut pages:
1. Set the user level to painting or higher.
2. Navigate to the page you want to cut. You may want to use the PGUP
and PGDN keys to change pages until you find the correct one.
3. Select the Cut Page command from the Edit menu (ALT+E, G).
A copy of the current page is placed on the clipboard, and the page is
removed from the pad.
The clipboard is a temporary storage area for pad elements that have
been cut or copied. If you want to retrieve information from the
clipboard, you must do so before you cut or copy another element,
because the clipboard only holds one item at a time.
________________________________________________________________________
Chapter 12: Manipulating Pads, Pages, and Backgrounds 206
________________________________________________________________________
PASTING PAGES
The Paste Page command inserts a page from the clipboard after the
current page in the pad. You can copy a page using the Copy Page and Cut
Page commands on the Edit menu.
To paste a page:
1. Use the procedure described earlier to copy or cut a page to the
clipboard.
2. Navigate to the page that you want the new page to appear after.
4. Select the Paste Page command from the Edit menu (ALT+E, P).
The page in the clipboard is placed in the pad after the current page
and then becomes the current page.
PASTING PAGES BETWEEN PADS
The Copy and Paste commands can be used to copy pages between different
pads. In doing so, the background is carried with the page and pasted,
too.
The Copy Page and Cut Page commands copy both the page and the
background to the clipboard. If you're pasting a page into the same pad
that it was copied from, only the page will be inserted (because the
corresponding background already exists in that pad). However, if you
paste a page into another pad, you'll also paste that page's background.
HyperPAD will recognize that the original background and the pasted
background are the same until you exit HyperPAD or run another program.
Thus, if you copy many pages that all use the same background between
two pads, the background will only be pasted once.
PASTING A PAGE AS THE FIRST PAGE OF A PAD
The Paste Page command always inserts the pasted page after the current
page. Since the insertion always occurs in this manner, you have to do
an extra step in order for the pasted page to become the first page of a
pad.
________________________________________________________________________
Chapter 12: Manipulating Pads, Pages, and Backgrounds 207
________________________________________________________________________
To paste a page as the first page:
1. Press CTRL+PGUP to view the first page of the pad.
2. Select the Paste Page command from the Edit menu (ALT+E, P).
The page will be inserted as page 2, and you will be viewing the pasted
page.
3. Press CTRL+PGUP again to change to the first page of the pad.
4. Select the Cut Page command from the Edit menu (ALT+E, G).
5. Select the Paste Page command from the Edit menu (ALT+E, P). Now,
the first page of the pad is the one that you originally copied.
DELETING PAGES
Deleting a page removes the page from the pad. Use caution because the
deleted page cannot be recovered using Undo, and a copy is not placed
into the clipboard.
If you feel unsure about deleting a page, use the Save a Copy command on
the File menu to create a backup copy of your pad under a different
name.
To delete pages:
1. Make sure the user level is set to painting or higher.
2. Access the page you want to delete.
3. Select Delete Page from the Edit menu (ALT+E, D).
The current page is removed from the pad.
You can't delete the only remaining page in a pad. In order to remove
the last page from a pad, you must delete the pad using the Delete
command on the File menu.
________________________________________________________________________
Chapter 12: Manipulating Pads, Pages, and Backgrounds 208
________________________________________________________________________
WORKING WITH BACKGROUNDS
OVERVIEW
Each page in a pad is assigned to a particular background. You can think
of the page as a transparency overlaid on the background. The pad
building elements on the background--such as paint, buttons, and
fields--show through to the page (unless, of course, the elements on the
page cover them up).
A background can be used by many pages, in which case the pad building
elements--such as paint, buttons, and fields--are visible on many pages.
Thus, the background serves as the backdrop (or structure) for all of
the pages that use it.
If the background is empty (i.e., it contains no paint, buttons, or
fields), then the structure of the pad is basically determined by the
contents of the pages. This type of pad usually has few similar visual
elements that are common to many pages.
BACKGROUND INFO
The Background Info dialog box contains information that you can use
while developing your pads, including the number of pages that use the
background and the background's name and ID.
To access the Background Info dialog box:
1. Navigate to the page that uses the background you want information
on. You may have to use the PGUP and PGDN keys to change to the
appropriate page.
2. Make sure the user level is set to painting or higher.
3. Select the Bkgnd Info command from the Objects menu (ALT+O, K).
________________________________________________________________________
Chapter 12: Manipulating Pads, Pages, and Backgrounds 209
________________________________________________________________________
The Background Info dialog box will be placed on-screen:
┌───────────────────────────────────────────────────────────────────────┐
│ │
│ **** The Printed Documentation has a picture or screen shot here **** │
│ │
└───────────────────────────────────────────────────────────────────────┘
The Background Info dialog box contains the following information and
options:
0 The name of the background.
0 The number of pages that use this background. This number will
never be less than one.
0 The number of buttons and fields contained on this background.
0 The No delete option.
0 Script button to take you to the background's script.
CHANGING THE NAME OF A BACKGROUND
You can change the name of a background using the Background Info dialog
box. You should choose a name that best reflects what the background is
used for. For example, if the background is used as a template for your
recipe database, then you might name the background "Recipe Template."
________________________________________________________________________
Chapter 12: Manipulating Pads, Pages, and Backgrounds 210
________________________________________________________________________
To change the name of a background:
1. Access the Background Info dialog box using the above procedure.
2. Type the new name of the background in the text box
and press ENTER.
PROTECTING A BACKGROUND
You can protect a background from being accidentally deleted by setting
the No delete option in the Background Info dialog box. This safety
feature prevents the last page that uses this background from being
deleted.
EDITING THE BACKGROUND
You can add buttons, fields, and paint to the background the same way
that you do with the page. Everything you add to a background will
appear on every page that uses that background.
To access the background:
Select the Background command from the Edit menu (ALT+E, B).
You can tell if you are editing the background when the status bar
displays "BKGND" or the Background command on the Edit menu is checked.
To return to editing the page, just select ALT+E, B again (the command
toggles you between the page and the background).
DELETING BACKGROUNDS
In order to delete a background, you must delete every page that uses
that background. Be careful when you delete the last page that uses a
particular background since there will be no warning indicating that the
background will also be deleted.
COPYING A BACKGROUND WITHIN THE SAME PAD
There is no direct way to make a copy of a background within the same
pad. You can, however, achieve the same effect by using another pad as a
temporary holder for the page and the background:
________________________________________________________________________
Chapter 12: Manipulating Pads, Pages, and Backgrounds 211
________________________________________________________________________
To make a copy of a background in the same pad:
1. Navigate to a page that uses the background that you want to copy.
2. Select the Copy Page command (ALT+E, O). The page and the background
are copied to the clipboard.
3. Create a new pad called TEMP. (Select the New command from the File
menu [ALT+F, N] and type TEMP, then press ENTER.)
4. Select the Paste Page command (ALT+E, P) to paste the page and the
background into the new pad.
5. Exit HyperPAD and return to DOS. You must exit all the way to DOS to
make HyperPAD "forget" the fact that the two backgrounds are the same.
6. Run HyperPAD again and load the TEMP pad.
7. Select the Copy Page command (ALT+E, O). This copies the page and
the background.
8. Navigate to the original pad.
9. Select the Paste Page command from the Edit menu. Both the page and
the background will be pasted into the pad.
CONCLUSION
This chapter described pads and the components from which they are
constructed, including pages and backgrounds. You learned how to perform
some general maintenance tasks such as saving a copy of a pad,
protecting a pad, and compressing a pad. You learned the relationship
between the pages and backgrounds and how they fit together, as well as
how to manipulate them during pad design.