TWPParagraphBorderDlg->Execute : Error message

  • Hello!

    Still migrating (to WPTools 5, BCB5)...

    When opening the Par. Border Dialog with ParagraphBorderDlg->Execute()
    an error message appears at runtime:
    "Error reading cbxShading->ItemIndex: Property does not exist".
    What could happen here?

    Kind regards,
    E. Hess

  • I got the message to disappear by:

    - converting (with BCB5's convert.exe) WpParBrd.dfm to text format
    (why are the DFMs not in text format by default?)
    - In the DFM, at cbxShading, I removed the property "ItemIndex = 0"
    - recompiling WPTools

    Then the border dialog opens without error message.
    Unfortunately cbxShading now initially has nothing selected, because - I guess - ItemIndex now is -1.

    I don't know why this works now - may be a problem between
    Delphi and BCB (5). Does anybody have the answer?

    Kind regards,
    E. Hess

    • Offizieller Beitrag

    Hi,

    the files are not in TEXT format for historic reasons.

    'ItemIndex' is a property which was inserted by Delphi 7. It is not published in previous VCLs. Sometimes it happens that an unknown property goes into the shipped version. Usually I open all forms in Delphi 5 to reduce the properties. Also BCB will do this for you automatically if you open the form file (WpParBrd.PAS) in the IDE.

    The cbxShading and all other elements are set to default when the dialog opens. The user can specifically change certain properties, all others will remain untouched. This avoids a problem which existed in WPTools 4 - all properties were changed.

    Julian Ziersch