Satimage Previous
Properties of controls
Home Documentation Smile Custom GUI Developing your own custom dialog Scripting a dialog Properties of controls  
Although there are different kinds of controls, Smile's dictionary defines only one dialog item class for all controls. The dialog item class inherits from the basic object class. All dialog items have the following properties:
control kind
an integer which specifies the kind of the control. You can change the value for the control kind property, provided you use a value which describes a valid kind of control. The change is effective only next time the control will be created, for instance by Cut-Paste or by closing then re-opening the dialog.
a reference to the dialog window where the control is installed.
a reference to the object which contains the control: this may be the dialog window itself, or some control installed in the dialog window.
a boolean which specifies whether the control is active. For instance, an Editable Text Box whose enabled property is set to false is visible but its contents are locked. A Check Box whose enabled property is set to false is visible but grayed out.
a boolean which specifies whether the control is visible. For instance you use visible to show and hide the Chasing Arrows control.
contained data
the contents of the control. The meaning of the contained data property depends on the kind of the control. Essentially, contained data contains the data required to handle the user's action, for instance the string that it contains for a Editable Text Box.
(contents is a deprecated equivalent for contained data.)
a record describing the font and style information for the text displayed by the control. Only those controls that display some text own a font property. The font property is a record, with all fields optional. The fields are:
an integer that specifies one of the default System fonts, or a string that specifies the name of a font. -1 is the large System font, -2 is the small System font. 1 and 2 are for OS9-like System fonts: 1 is for Geneva 9 and 2 is for New York 9.
text size
an integer that specifies the size of the font. If a font name was specified as the font field and no text size is provided, then the control assumes the dialog's text size.
a list of 3 integer values (Red, Green, Blue) in the range 0..65535, for instance {65535, 0, 0} (red). Only the Static Text Box supports colored text.
a record containing one or both of the two labels on styles and off styles. The values for those labels are lists of one or several of the following constants: bold, italic, underline, outline, shadow, condensed, expanded, for instance {on styles: {bold, italic}}.
call script
a boolean which specifies whether the user's actions directed to the control will trigger a click in event. When the control's call script property is set to true Smile sends click in to the script of the control's container (the dialog itself, or another control) when the user acts on the control. The use script check box of the control's settings dialog reflects its call script property.
want idle
a boolean which tells whether the dialog window will receive the idle event periodically, or not. Using the idle event is a way of performing background tasking in Smile.
Some controls have additional properties. Use the contextual menu in edit mode to set the specific properties of a control. Use the drag-and-drop from the dialog window to a text window to view the list of a control's properties.
Copyright ©2008 Paris, Satimage