Editing Dialogs

Top  Previous  Next

 

The Edit Dialog Definition dialog is shown when adding or editing Menus from Dialogs Setup.  

 

Here you can view and edit all of the Items in a Menu Definition.  There are a few fields you edit directly for the definition, and the rest of the dialog lists the Dialog Elements.

 

 

Dialog Name

 

The name should at least be descriptive enough for identifying the Dialog in Dialogs Setup, but if it's a new dialog rather than an Add-on, then this name will also be the title of the dialog when it's displayed and also the name used to open it from the DlgOpenUserDialog( ) function.  Each Dialog Definition must have a unique name, whether it's an Add-on or not.  The name is not case-sensitive, so "My Dialog" is considered the same as "my dialog".

 

 

Add-On

 

To define changes or additions to a standard dialog, check this box and select the appropriate dialog from the list.  To create a brand new dialog, leave this box unchecked.

 

Only one Add-on Dialog Definition can be Enabled for each standard dialog in most cases, e.g. for the Reservation Details dialog -- but you can actually create multiple definitions for the same dialog as long as only one is Enabled at a time.  Thus you could experiment with a new definition without taking it "live" by changing which one is enabled.

 

There is a special dialog template called "Edit Generic Record", which is used as an Add-On but must also have a Base Table (see the "The Edit Record Dialog" section for details).  This is the one case where more than one Add-on of a dialog type may be used (and enabled), but each one must have a different Base Table.  

 

 

Enabled (Add-on only)

 

An Add-on Dialog Definition can be disabled by unchecking this box, so that it does not get processed.  This is only applicable to Add-on dialogs, because non-add-on dialog definitions aren't automatically used (only opened explicitly through an expression function).  If an add-on dialog definition is disabled then it won't modify the base dialog at all, as if the definition is not even there.

 

 

Base Table (non-Add-on only, or Add-on for the "Edit Generic Record" type)

 

A Dialog Definition that's not an Add-on needs to have a Base Table selected (any Add-on has a base table already defined by the dialog it's modifying).  Select the table for the type of record will be shown (and possibly modified) in the dialog.  In general, any new dialog is assumed to be operating on a single record of the selected type, and this context record is specified when the dialog is created through the DlgOpenUserDialog( ) function.  

 

The Base Table selection also affects which fields are available in the Quick-Add Fields function (described in the Dialog Elements List section to follow).

 

 

Width & Height

 

The units for these values are screen pixels, so you should know the resolution of the screen (or screens) to be used.  As a general guide, Campground Master typically uses dialogs that will fit on 640x480 screens, but some will be sized for 800x600 screens automatically if the current resolution is high enough.  Since most modern systems have a resolution of 1024x768 or higher, it's possible that you can use much larger dialogs to allow for more fields.

 

Note: If you're using Campground Master on multiple computers, be sure to design for the lowest resolution in use, otherwise the dialog may not be completely visible on some displays.  Don't forget to take into account any computers you use as backups or off-season work, for instance your laptop computer.  You can check the resolution on any computer by right-clicking on the Desktop and selecting Properties, then go to the Settings tab.

 

For Add-on dialogs, the Width & Height specify how much the original dialog is enlarged, if at all.  You can enter 0 for either or both values if you don't need it enlarged for the changes you're making.

 

For non-add-on dialogs, the Width & Height specify the entire size of the dialog.  This defaults to 600 x 400 by default, to make sure it fits on the smallest typical display (640x480, allowing for margins, task bars, etc.).

 

 

Quick-Add 'Save' & 'Cancel' buttons (non-Add-on only)

 

When you create a new dialog, you usually want to have Save and Cancel buttons on it for saving or canceling the changes to the data fields.  Clicking this button will automatically add Dialog Elements for Save and Cancel functions in the typical upper-right positions in the dialog.  The elements added will include the Action expressions needed for typical functionality.

 

If you decide to change the size of the dialog after adding these, you can delete the previous Save and Cancel elements and then click this button again to add them in the correct position for the new size.  (Or you could just edit the Left positions manually in the elements.)

 

If you add these before adding other Dialog Elements, then you might want to move them down to the bottom when you're done so they're the last things controls in the tab order (more on that later).

 

 

Save & Test Dialog

 

This function allows you to quickly test the dialog, or at least see the results of your modifications.  This function can be used to test the dialog repeatedly without completely exiting the Edit function.    

 

The appropriate host dialog will be opened (if it's an Add-on definition), or it will create and open your new dialog, using the first record of the appropriate Base Table type as the context record.  This allows you to basically see where new items are positioned, what the data looks like, test its functionality, etc.

 

Be careful when testing, because any changes to the data in the dialog (or other functions activated) will be real changes!

 

Also be aware that it does completely save any changes you've made to the Dialog Definition as soon as you click the Save & Test button, so it negates any possibility of canceling changes you've made to the definition.

 

 

 

 

Additional Topics:

 

Dialog Elements List

 

Dialogs Overview

Dialogs Setup

Editing Dialog Elements

 

Dialog Control ID Reference

 

Expressions

 

Advanced Customizations Overview & other topics

 

 

 


Page URL https://CampgroundMaster.com/help/editingdialogs.html

Campground Master Home