spd - Create menu¶
This option is for creating new items. The subitem menu consists of the items which may be created.
Windows may be created at any time.
Window objects are assigned to the currently active window, and cannot therefore be created if there is no selected item, or if the selected item is not a window or window object. A window object can be created by a right-click in the window; a menu opens listing the objects than can be created, and the new object is positioned at the point clicked on.
Declaration-type objects have no parent window and may be created at any time.
A valid identifier is created automatically, composed of the item type plus a unique numerical suffix, e.g. Window3, Textbox4, Listbox1, the suffix being the lowest number unused for an object of this type. If an identifier has been allocated to the templates for textboxes or buttons, this identifier is used instead of the item type.
All windows and window controls are given the default form +object_id. If it is a window this means it should be created when the program loads; if a control, that it should be created when the parent window is created. This is indicated by the value TRUE in the Create property box. Change this to FALSE to give the object the form -object_id. This means it must be explicitly created with the create command.
The table below lists the default property values that are assigned to each object type when it is created. All of these may be edited. Default values are assigned to almost all mandatory properties. Exceptions to this are stated below.
Window¶
Property |
Value |
window_id |
Window1, Window2, Window3… (the lowest unused value). The identifying name by which the window is subsequently referenced. See Defining a window. |
Co-ordinates |
10 20. This is the initial position of the top left corner (origin) of the window, relative to the origin of the screen (top-level windows) or of the parent window (child windows). See Window position. |
Create |
TRUE |
Maximum height |
|
Maximum width |
|
Title |
The window_id. See Window title. |
The new window is added to the displayed windows list, and becomes the new selected object.
Group¶
A textbox group or button group.
Property |
Value |
group_id |
Group1, Group2, Group3… (the lowest unused value). The identifying name by which the group is subsequently referenced. See Window object identifying name. |
Group type |
radio. |
Push Button¶
This option has a further submenu offering these choices:
Top Level |
Create the button as a top level, ungrouped control. |
In Group |
Place the button in a push button group. If the currently selected item is a push button group or grouped push button, the new button is placed in that group automatically. Otherwise, the user is prompted to choose an existing push button group or create a new one. |
Any values which have been specified in the button template are displayed as the default for the new button. The following default values are provided if no corresponding value has been specified in the template:
Property |
Value |
button_id |
The identifying name by which the button is to be referenced. If defined in the template, a numeric suffix is added in the standard way. See Window object identifying name. |
Co-ordinates |
0, 0. See Window object position. |
Create |
TRUE |
Label |
The button_id. See Button label. |
Checkbox Button and Radio Button¶
If the currently selected item is a button group of the same type as the new button, the button is placed in that group. If the currently selected item is a button of the same type as the new button, the new button is placed in that button’s group. Otherwise, the user is prompted to choose an existing group or create a new one.
Any values which have been specified in the button template are displayed as the default for the new button. Default values are the same as for push buttons.
Textbox¶
This option has a further submenu offering these choices:
Top Level |
Create the textbox as a top level, ungrouped control. |
In Group |
Place the textbox in a group. If the currently selected item is a textbox group or grouped textbox, the new box is placed in that group automatically. Otherwise, the user is prompted to choose an existing textbox group or create a new one. |
Any values which have been specified in the textbox template are displayed as the default for the new box. The following default values are provided if no corresponding value has been specified in the template:
Property |
Value |
textbox_id |
The identifying name by which the textbox is to be referenced. If defined in the template, a numeric suffix is added in the standard way. See Window object identifying name. |
Co-ordinates |
0, 0. See Window object position. |
Create |
TRUE |
Label |
The textbox_id. See Textbox label. |
Note that a textbox must be assigned a linked field.
A number of textboxes can be created simultaneously, linked to selected fields from a keyed file or record structure. See Multiple Textboxes.
Table¶
Property |
Value |
table_id |
Table1, Table2, Table3… (the lowest unused value). The identifying name by which the table is subsequently referenced. See Window object identifying name. |
Co-ordinates |
0, 0. See Window object position. |
Create |
TRUE |
Note thata valid source object must be assigned to a table.
Listbox¶
Property |
Value |
listbox_id |
Listbox1, Listbox2, Listbox3… (the lowest unused value). The identifying name by which the listbox is subsequently referenced. See Window object identifying name. |
Co-ordinates |
0, 0. See Window object position. |
Create |
TRUE |
LIST_BOX. |
Static Text¶
Property |
Value |
text_id |
StaticText1, StaticText2, StaticText3… (the lowest unused value). The identifying name by which the text is subsequently referenced. See Window object identifying name. |
Co-ordinates |
0, 0. See Window object position. |
Create |
TRUE |
Label |
The text_id. See Static text label. |
OLE Control¶
Create a new OLE or Active X control in the active window. The window must have the style WS_CONTAINER; if it does not, the user is prompted to add this style before continuing.
Property |
Value |
ole_ctrl_id |
Ole1, Ole2, Ole3… (the lowest unused value). The identifying name by which the control is subsequently referenced. See Window object identifying name. |
Co-ordinates |
1, 1. See Window object position. |
Create |
TRUE |
Either an OLE Control Id or a Link Id must be provided (but not both). See Ole control program reference or link.
Menu¶
Creates a new menu. The identifier (menu_id) Menu1, Menu2, Menu3… (the lowest unused value) is assigned.
The Menu editor opens for the addition of menu items. The menu_id can also be edited from within the Menu editor.
Menu Item¶
Creates a new top level menu item for the active window. If the currently selected item is a menu item, the new item is assigned to that menu as a top-level item, after any existing top-level items. Otherwise, the user is asked to select the top-level menu to which the item is to belong. This may be any existing menu for the window, or may be a new menu created at this point. If new, the menu is assigned the identifier (menu_id) Menu1, Menu2, Menu3 … (the lowest unused value). This can be edited using the Edit window, Property window or Menu Editor.
The following default properties are assigned to a new menu item:
Property |
Value |
item_id |
MenuItem1, MenuItem2, MenuItem3… (the lowest unused value within the menu). The identifying name by which the item is subsequently referenced. See Window object identifying name. |
Label |
The item_id. See Menu item label. |
Graphic¶
Property |
Value |
graphic_id |
Graphic1, Graphic2, Graphic3… (the lowest unused value). The identifying name by which the graphic is subsequently referenced. See Window object identifying name. |
Co-ordinates |
10, 10. See Window object position. |
Create |
TRUE |
Height |
|
Width |
|
GT_RECTANGLE |
Multiple Textboxes¶
This option allows a series of textboxes, linked to fields from a related source, to be placed in the active window.
First select the source object of the related fields. This must be a keyed file or temporary record structure defined in the program. If only one such source object is defined, it is selected automatically.
A new window opens listing the fields defined in the selected source. Choose the fields that are to be included. Click on a field to select it, deselecting all others. CTRL-click on a field to select it without deselecting others. SHIFT-click on a field to select it and all other fields between it and the last selected field.
A textbox is created for each selected field, and the textboxes are then displayed on the screen. The first box is placed at the co-ordinates specified in the textbox template, and the y co-ordinate increased for each successive box. The boxes may then be moved, resized or edited in the usual way. The initial appearance of each box is determined by the values in the textbox template. Where no values are provided, standard defaults are used. Each box is assigned a box_id consisting of the box_id specified in the textbox template, with the name of the linked field appended. Note that a null value is valid for the textbox template box_id. In this case the new box_id is identical to the field_id.
Note
For this option to be valid at least one possible source object must be defined, and the currently selected item must be a window or window object.
Configurable Text File¶
An external text file, created by the utility sctextw. Note that the text within the file may only be changed by using the sctextw utility. A unique identifier (textfile_id) must be provided. The default names Text1, Text2… are offered.
The File group box requires the name of a configurable text file residing in the $SCULPTOR/text directory, not including the extension (e.g. .eng, .esp).
Function¶
A user-defined function. The function is given the name Function1, Function2, Function3… (the lowest unused value) and displayed in the source code window ready for editing.
If the function is created as an event function for a window or window control, appropriate function parameters are created automatically. For example: a window is selected and a new function created via the Event box on the window’s property sheet. The function is automatically assigned the parameters (EventCode, Object). These names may be amended.
Database¶
An ODBC database.
Property |
Value |
database_id |
DBase1, DBase2, DBase3… (the lowest unused value). The identifying name by which the database is subsequently referenced. See Window object identifying name. |
Connected |
TRUE. For an ODBC database, the TRUE/FALSE value of the Connected property works in the same way as Create does for window objects, determining whether it has the form +database or -database. |
Database cursor¶
An ODBC database cursor. If the currently selected item is a database, the cursor is assigned to that database. Otherwise, the user is asked to select an database or create a new one. If new, the database is assigned the identifier (database_id) DBase1, DBase2, DBase3… (the lowest unused value). This can be edited using the Edit window or Property window.
Keyed File¶
Property |
Value |
file_id |
File1, File2, File3… (the lowest unused value). The identifying name by which the file is subsequently referenced. |
!<keyword> |
!file |
update |
The file name (data dictionary file) must be specified.
Temporary Record Structure¶
Property |
Value |
record_id |
Record1, Record2, Record3… (the lowest unused value). The identifying name by which the structure is subsequently referenced. This is the prefix for all the fields contained within the structure. |
The Record editor window opens for the entry of the record structure’s properties.
Temporary Variable¶
Property |
Value |
field_id |
Temp1, Temp2, Temp3… (the lowest unused value). The identifying name by which the field is subsequently referenced. See Naming temporary fields. |
a20 |
Note
Sculptor system variables may not be modified.
!layout¶
Property |
Value |
file_id |
The file_id of the first file defined in the program. It is not possible to create a !layout if no files are defined. |
File name |
The path of the file. Enter “?” to browse for the file. |
This is supported for backwards compatibility only. !layout should not be used in new programs.
RELATED TOPICS |