The following tasks are associated with using an IEntryField*
part in visual composition. Tasks that are common to many parts
are described in related topics.
-
- Defining initial text for an entry field
- To define initial text for the entry field, do one of the
following:
- On the composition surface, directly edit text in
the entry field.
- In the part property sheet, enter text in the
value column of the text property.
- Connect a variable text source to the
IEntryField* text attribute. Make this
connection before the connection to show the
window that contains the entry field.
- Aligning text
- To align text in the entry field, open the style
property in the IEntryField* property sheet. Then, set
one of the following styles on and set the others off:
- centerAlign--to center text in the entry
field
- leftAlign--to position text at the left
end of the entry field
- rightAlign--to position text at the right
end of the entry field
The default style sets the leftAlign style on.
- Preventing user changes
- To prevent the user from entering or modifying text, open
the style property in the IEntryField* property
sheet and set the readOnly style to on.
- Assigning text
- To copy text into the entry field when the user presses a
push button, do the following:
- Connect the IPushButton* buttonClickEvent
feature to the IEntryField* text
attribute.
- Connect the data source to the text
parameter of the buttonClickEvent-to-text
connection.
- Copying text from an entry field
- To copy the contents of the entry field as text when the
user presses a push button, do the following:
- Connect the IPushButton* buttonClickEvent
feature to an action of the target part that sets
text for the part.
- Connect the IEntryField* text attribute to
a text parameter of the buttonClickEvent-to-action
connection.
- Copying numeric data from an entry field
-
To copy the contents of the entry field as numeric
data when the user presses a push button, do the
following:
- Connect the IPushButton* buttonClickEvent
feature to an action of the target part that sets
the numeric value for the part.
- Connect the IEntryField* valueAsInt
attribute or valueAsDouble attribute to a
numeric parameter of the buttonClickEvent-to-action
connection.
Common Tasks for Control Parts
Setting Part Style Properties
Setting Part Color Properties
Setting Part Font Properties
Setting Part Handlers
Properties
Setting Part Framing Properties
Editing Part Labels Directly
Providing Drag and Drop Support
Working with VisualAge User
Interface Parts
IEntryField
Property Settings --
IEntryField
Portability --
IEntryField