Skip to content

New TextEdit Controls

DataFlex supports data-aware (cdbTextEdit) and base (cTextEdit) controls for manipulating rich plain text. These new controls replace dbEdit and Edit as the recommended and default plain text editing controls in DataFlex. In addition to the new controls, the following related changes have been made:

  • Both controls have been added to the appropriate page of the Controls Palette in the Studio.
  • The obsolete dbEdit and Edit controls have been removed from the Controls Palette.
  • All examples that used the dbEdit and/or Edit controls have been updated to use cdbTextEdit and/or cTextEdit.
  • The Studio Wizards will generate the new controls where appropriate.

You can continue to use the obsolete controls in your application, but migrating to the new controls exposes the following additional capabilities and advantages:

  • Consistent interface: the TextEdit and RichEdit controls are based on the same base control.
  • The line interface is no longer needed to retrieve value.
  • Added get/set selected text interfaces.
  • Size for dbTextEdit is limited only by the database.
  • Size for TextEdit is limited by system/performance.
  • Supports all standard Windows shortcut keys.
  • Read and write methods are the same as the obsolete controls.
  • Overall improved interface.

If you do migrate your applications to use the new controls, you will need to pay special attention to:

  • Removing references to the line interface (item interface) and replacing them with Get/Set Value.
  • Removing redundant shortcut key definitions.
  • Method and property name changes:
  • Wrap_State becomes pbWrap.
  • Line_Count does not exist.