The following tasks are associated with using an
IMultiLineEdit* part in visual composition. Tasks that are common
to many parts are described in related topics.
-
- Defining initial text
- To define initial text for a multiline edit control, 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 text source to the IMultiLineEdit* text
attribute. Make this connection before the
connection to show the window that contains the
multiline edit control.
- Preventing user changes
- To prevent the user from entering or modifying text, open
the style property in the IMultiLineEdit* property
sheet and set the readOnly style to on.
- Adding text
- To add text into the multiline edit control when an event
occurs, use one of the add actions. For example, to
append text at the end of the current text, do the
following:
- Connect the event to the IMultiLineEdit* addAsLast
action.
- Connect the text source to the text
parameter of the connection.
- Loading text from a file
- To load text into the multiline edit control when the
user presses the OK push button in a file dialog, do the
following:
- Connect the IVBFileDialog* pressedOK event
to the IMultiLineEdit* importFromFile
action.
- Connect the IVBFileDialog* fileName
attribute to the fileName parameter of the
pressedOK-to-importFromFile
connection.
- Saving text to a file
- To save the contents of the multiline edit control to a
file when the user presses the OK push button in a file
dialog, do the following:
- Connect the IVBFileDialog* pressedOK event
to the IMultiLineEdit* exportToFile
action.
- Connect the IVBFileDialog* fileName
attribute to the fileName parameter of the
pressedOK-to-exportToFile
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
IMultiLineEdit
Property Settings --
IMultiLineEdit
Portability --
IMultiLineEdit