spd - Edit menu


Note that Copy, Paste, Delete and Restore operations can be carried out by means of a right-mouse click on the object (or, in the case of Paste, at the position where the copied object is to be pasted to.)


Copy selected item

image0

Copy the selected item into memory. It may subsequently be pasted into the program by means of the Paste option.

A copied item is retained until overwritten by a subsequent copy operation. Even if the actual item is deleted, the copy remains in memory available for pasting. Note however that opening a new program causes the copied item to be cleared.

Copying a window also copies all the groups, menus, controls and graphics contained in the window, but does not copy child windows.

Copying a group copies all the items in the group and retains the group type: button, radio, checkbox or textbox.

Copying a menu item also copies any submenus attached to the item.

Note

All or part of the definition of an object or objects can be copied to the clipboard by highlighting the text in the source window and pressing CTRL-C. This is a completely separate operation from the Copy menu option. Copy is not a clipboard operation, and using it to copy an item has no effect on the current contents of the clipboard.


Paste selected item

image1

Paste the currently copied item into the source file. The item must have been copied by means of the Copy option.

If there is no conflict, the pasted item is given the name of the copied item. This may occur for several reasons: the copied item may have been deleted or renamed since being copied, or the new item may be pasted into a different window or group, causing it to have a distinct long name. If the original name cannot be used without a conflict arising, then the suffix “1” is added if this makes a unique name; otherwise the suffix “2” is tried, and so on until a unique name is found. Note that if the name already ends in a number, that number is increased when creating the new name. That is, a copy of a button named Button1 will be pasted as Button 2, not Button11; a button called Button54 will be pasted as Button55.

The location where the new item is pasted depends both on its type and on the type of the currently selected item.

Temporary variable

Always pasted into the ‘tmp’ group immediately after the last such variable currently defined in the program code. The currently selected item is irrelevant.

Window

Pasted as a top level window after the last window declaration in the program code. The currently selected item is irrelevant.

Button

If the selected item is a grouped button or a button group, a button is pasted into that group. Otherwise it is pasted as an ordinary push button in the active window. If a button is pasted into a group of a different type, the type of the button is changed to that of the group.

Textbox

If the selected item is a grouped textbox or textbox group, a textbox is pasted into that group. Otherwise it is pasted as a top-level control in the active window.

Listbox
Table
Static text
OLE control

Pasted as a top-level control after all existing controls in the active window.

Graphic

Pasted after any existing graphics in the active window.

Group

Pasted to the active window, retaining its type.

Menu item

If the item to be pasted is a menu item, and the selected item is also a menu item, the item is pasted at the end of the selected item’s menu or submenu. Otherwise the user is asked to select the menu from a list of all menus in the active window, or to create a new menu for the item.

Note

This is not a clipboard operation. Cutting and pasting in the source code window is, however, a clipboard operation, and uses the standard keys for cut and paste operations. (CTRL-V, CTRL-C, CTRL-X).


Delete selected item

image2

Delete the selected item. Deletion is irreversible, so use this option with care. A warning prompt is always issued.

If a window is deleted, all window objects contained in it are also deleted.

If a group is deleted, all the buttons or textboxes in the group are also deleted.

If a menu item is deleted, all its submenu items are also deleted.

If a record structure is deleted, any temporary fields declared within it are deleted automatically.

The only way to restore a deleted item is to exit from the program designer without saving the file. Any other amendments made since the last save will be also be lost.

Note

Menu items may also be deleted by means of the Menu editor.


Restore selected item

Restore the currently selected item to the state it was when most recently selected. Any changes made to its properties since then are undone. If the item was newly created, it is restored to its state when created. If more than one item is selected, this option only restores the primary selected item.


Order selected item

image3

Change the order of items. The items available for moving depend on the currently selected item, as follows:

Selected Item

Items to be ordered

Window

Groups and top-level controls in the window.

Group

Items in the group.

Top-level control

Groups and top-level controls in the parent window.

Grouped control

Items in the group.

Graphic

Graphics in the parent window.

Temporary record

The fields in the !record structure. The Record editor can also be used to move record fields.

Temporary variable

The fields in the parent !record structure.

A window opens, listing the items available for re-ordering. An item is selected by clicking on it. Then the Top, Bottom, Up and Down buttons are available to move the item to the top or bottom of the list, or up and down a single line.

Changing an item’s order does not affect its position on the screen, only its position in the source code. In the case of a control, this determines its position in the tab sequence of its parent window. The tab sequence is the order in which controls receive focus when the user presses the TAB key during a dialog. The tab_order clause is used at run time to change a control’s position in the tab order.

Note

To change the order of menu items, use the Menu editor.


Record Editor

This option is only enabled if the selected item is a temporary record structure (!record).

Temporary record structures are of two types: those which include a file or record structure in their definition, and those that have a field list.

If a file or record structure is included, it must be that of a Sculptor keyed file (![o]file) declared in the program, or of a temporary record structure (!record) that does have a field list, defined in the program. The fields in the new record structure match those in the existing structure, and no field list is necessary. Select the file or record from the drop down list in the File Id box, which lists all suitable keyed files and record structures defined in the program. If a structure is specified, the editing buttons for the field list are disabled; there is no further editing to be done. A structure cannot be selected if any fields have been listed.

If the record structure has a field list, the buttons at the bottom of the editor have the following functions:

Add

Add a field to the end of any current fields. The field is given the name Temp1, Temp2, Temp3 - the lowest number available - and default size of a20. Both name and type can be edited, using the Edit window or Property window, after the record editor is closed.

Delete

Deletes the highlighted field.

Top

Moves the selected field to the top of the list.

Up

Moves the selected field up one position in the list.

Down

Moves the selected field down one position in the list.

Bottom

Moves the selected field to the bottom of the list.

Delete all fields

Deletes all the fields. The File Id listbox can then be used to select a file or record from which the field list will be taken.

OK

Saves changes and closes the record editor.

Cancel

Closes the record editor, abandoning changes and restoring the previous values.


RELATED TOPICS

Set insert point

This option enables the user to define the position in the source code at which newly created items (other than window objects) will be placed. First set the point by selecting an item in the File tree, then select this menu option. Newly created items will be placed immediately below the selected item.


RELATED TOPICS

The Sculptor program designer