Working with IMultiLineEdit Parts

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:

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:
  1. Connect the event to the IMultiLineEdit* addAsLast action.

  2. 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:
  1. Connect the IVBFileDialog* pressedOK event to the IMultiLineEdit* importFromFile action.

  2. 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:
  1. Connect the IVBFileDialog* pressedOK event to the IMultiLineEdit* exportToFile action.

  2. Connect the IVBFileDialog* fileName attribute to the fileName parameter of the pressedOK-to-exportToFile connection.


Related procedures
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

Related references
IMultiLineEdit
Property Settings -- IMultiLineEdit
Portability -- IMultiLineEdit