You can change the properties of Formatted Text parts so that they automatically validate the data that the user enters and format the data for display. To do this, you modify the format property associated with the Formatted Text part.
To have the data in the Enter SSN field appear in the format of a standard U.S. social security number, you must change the format type of the Formatted Text part to Social Security Number.
to open the Formats dialog. From the Data type drop-down
list, select String. This indicates that the type
of data is string.
to open the Format string dialog. From the Predefined
formats , select Social security number (U.S.)
and then select OK to close the Format string window, select
OK to close the Formats dialog.
from the tool bar.
To have the data in the Price per share field appear as currency, you must change the data type of the Formatted Text part to Monetary Amount.
to open the Formats dialog. From the Data type drop-down
list, select Monetary. This indicates that the
type of data is monetary.
from the tool bar.
For more information on validating and formatting data, see the VisualAge Smalltalk User's Guide .