Using the RTF interface methods with an RTF text control on a report, and sizing a hidden window control to match

Applies to: posted in the Clarion 10 group (2017); no other version number in the text.

Problem

A developer wanted to fit RTF text in a report detail. Two obstacles: (1) with an RTFControlClass object bound to an RTFTextControl in a report detail, the interface methods did nothing and gave no error; (2) with the RTFTextControl hidden on a window of the report procedure, the interface methods worked, but that control must have exactly the size of the one on the report (the report uses millimetres and thousandths).

Solution

  1. SETTARGET to the report, and call myRTFobject.Init(?myRTFcontrol); without the Init it would GPF.
  2. Size the window control with PROP:Thous on the window to match the report layout. PROP:MM also worked.
  3. Check which structure a control equate belongs to. The first attempt failed because of ?WinRTFbox{PROP:Height} = theReport $ ?theText{PROP:Height}, where ?theText was another RTFTextControl on the window, not the one on the report.
  4. A poster explained that an equate is a number, so theReport $ ?theText is legal and points at some other control of the report with that number. The poster who made the error agreed it is not a bug in the classical sense but wished the compiler warned.

Caveats

  • Question (1), whether an RTFControlClass object can be bound directly to a report control, was not answered in the thread.
  • A reader asked for an example app and the poster promised the code; none is in the thread.

Today (2026)

The checks are plain Clarion property and equate behaviour and likely still hold; not re-tested.

Sources: Thomas G. (Sep 2017, the question and the fix), Federico N., Leonid C., Liam (Sep 2017) in sv.clarion.clarion10.