The newformobject, changeobjects and cloneobjects statements allow a procedure to specify the exact properties of any form object. There are nearly a dozen standard object properties that can be modified, and hundreds of "native" object properties. This page describes the properties that can be modified by these statements.

Standard Object Properties

There are nearly two dozen standard properties that can be modified. (Note: standard properties can be specified in either upper or lower case, or a mixture. In other words, "font", "Font" and "FONT all specify the same property, the font name).

“alignment” - If an object contains content that can be aligned (text or images) this property may be "Left", "Center" or "Right". This example creates a right aligned Text Editor Object for editing a numeric Price field.

newformobject "TextEditor","fieldname","Price","alignment","right",...

“color” - The color of the object (see Colors). For example, this procedure creates a green star.

newformobject "Star","color",htmlrgb("00FF00"),...

“controlsize” - A number of “widget” objects come in three sizes: Regular, Small and Mini (these sizes are defined by Apple). The controlsize property modifies the size value for the specified object. If the object doesn’t have a control size, this property will be ignored. This example creates an extra small checkbox button.

newformobject "DataButton","controlsize","mini",...

“expandable” - This property can be set to true or false depending on whether or not you want the object to expand based on the amount of data to be printed (see Variable Height Records).

newformobject "TextDisplay","formula","Description","expandable",true(),...

“expandshrink” - This property will be true or false depending on whether or not not you want the object to expand and shrink based on the amount of data to be printed (see Variable Height Records).

“disabled” - Set this property to true if you don’t want it to respond to clicks. Objects that can be disabled include push buttons, checkboxes, radio buttons, pop-up menus, sliders, steppers, segmented buttons and tab panels. When these objects are disabled they switch to a “grayed out” appearance, and don’t respond to clicks.

“fieldname” - If an object is linked to a field or variable (for example a Text Editor Object, Data Button Object, Popup Menu Button Object, etc.), this property allows you to specify the name of the field or variable. This example creates a Popup Menu Button Object that modifies the Shipping field of the database (or a Shipping variable if there is no such field).

newformobject "Popup","fieldname","Shipping",...

“formula” - If an object displays information via a formula (for example Text Display Object, Image Display objects, etc.), this property modifies the text of the formula. This example creates a Text Display Object that displays first and last names from the database in the format Last, First, omitting the comma if there is no first name.

newformobject "TextDisplay","formula",{yoke(Last,", ",First)},...

“font” - If an object displays or edits text, this property modifies the name of the font (for example "Times-Roman" or "Verdana"). This example creates an object that displays text in Palatino 14 type.

newformobject "TextDisplay","font","Palatino","textsize",14,...

“linewidth” - This property is the width of the object border, if any (in points).

“locked” - This property can be set to true to lock the object (to prevent it from being accidentally dragged or resized).

“name” - This property allows you to assign a name to an object, for easy identification later (see Object Names). This example creates a Matrix object named Photo Catalog.

newformobject "Matrix","name","Photo Catalog",...

“opacity” - This property is the opacity of the object, a number from 0 (completely transparent) to 100 (fully opaque). This example creates a semi-transparent blue star.

newformobject "Star","color",htmlrgb("0000FF"),"opacity",50,...

“procedure” - This property modifies the source code associated with the object. (All objects have procedures associated with them, although for some objects (geometric shapes, for example) this code will never be triggered. This example creates a button that says Hello World when pressed.

newformobject "PushButton","procedure",{message "Hello World"},...

“rectangle” - This property allows you to set/modify the dimensions of the object (location and size). This example creates a row of five stars that are spaced one inch apart.

local starSpot
starSpot = rectanglesize(100, 100, 48, 48)
loop
    newformobject "Star","rectangle",baseRectangle,...
    starSpot = rectangleoffset(starSpot, 0, 72)
until 5

See Graphic Coordinates to learn more about rectangles in Panorama.

“textsize” - If an object displays or edits text, this property modifies the size of the text. This example creates an object that displays text in Palatino 14 type.

newformobject "TextDisplay","font","Palatino","textsize",14,...

“tile” - If an object is a Report Tile this property is the type of tile, for example "Data Tile", "Summary Tile" or "Top Margin". This example creates a mailing label.

startgraphicschange "Create Mailing Label"
local labelRect
labelRect = rectanglesize(100, 100, 72, 72*2.75)
newformobject "ReportTile","Tile","Data Tile","Rectangle",labelRect
newformobject "TextDisplay",
    "Rectangle",rectangleinset(labelRect,6),
    "Formula",{Name+cr()+Address+cr()+City+", "+State+" "+Zip}

“title” - If an object is a button this property is used to set/modify the title of the button (if any). For any other type of object this property is ignored. This example creates a button titled “Hello”.

newformobject "PushButton","title","Hello","procedure",{message "Hello World"},...

Native Object Properties

Each type of object also has its own native properties beyond the standard set. Some complex objects have dozens of properties. To modify a native property, prefix the name with a $ symbol, like this:

objectinfo("$<native property name>")

This example creates a 15 point star.

newformobject "star","$PolygonCorners",15,...

This example creates an animated GIF image, and starts the animation.

newformobject "Image",
    "Formula",imagePath+"bouncing.gif",
    "$ImageDisplayAnimation",1

Important Note: Native properties are case sensitive. For example, to access the number of corners a polygon object has, you must use "$PolygonCorners". It won’t work if you use "$polygoncorners", "$POLYGONCORNERS", or any other combination of upper and lower case.

You can literally modify any property of an object with native properties. Because there are so many native properties, and because they are constantly evolving as Panorama changes, we’re not explicitly documenting them here. However, you can use the objectinfo("propertynames") function to get a list of all of the available native properties for an object. You can also use the objectinfo("properties") function to return a dictionary that contains all of the properties and their values. For example, suppose your form contains an object named testObject, you could use this procedure to display a list of all of this objects properties.

object "testObject"
displaydata dumpdictionary(objectinfo("properties"))

Here’s what the output would look like for a typical push button object.

Color="3AAB27"
Class="PushButtonObject"
Fill="Solid"
FontSize="13 px"
PushButtonTransparent="0"
Opacity="100 %"
PushButtonDefaultButton="0"
ShadowBlur="10"
SizeHeight="185 px"
Stroke="None"
PushButtonStyle="Push Button"
StrokeWidth="1 px"
TextAlignment="Center"
Name="testObject"
LocationX="369 px"
SizeWidth="185 px"
FontName="LucidaGrande"
Procedure=""
ProcedureStatus="Ok"
PushButtonSize="Regular"
PushButtonTitle="Button"
ShadowOpacity="75%"
ShadowBrightness="0%"
DropShadow="0"
Locked="0"
PushButtonSystemFont="1"
ShadowAngle="45"
LocationY="173 px"
ShadowDepth="6"

You’ll notice that some of these native properties are the same as the standard properties for the object – for example LocationX, Color, FontName, etc. Panorama actually generates the standard properties from the native properties for you as a convenience, but the native properties are the fundamental properties for the object.

All native properties are represented as text values, even if the underlying property is numeric or Boolean. Boolean (yes/no) values are represented as either 0 (no) or 1 (yes).