Storing text in TWPTextObj

  • Hi Julian,

    Where would be the best place to store a string inside a TWPTextObj?

    I looked into TStrings "extras" but I could not get them to work.

    I was thinking I could put a string into the embedded string but I cannot get the string data back out.

    Is there a way?

    Thankyou
    Tim

    Einmal editiert, zuletzt von timk5020 (6. Juli 2010 um 18:27)

  • Hi Julian,
    I did try using the params property but it has the side effect of having the data I put in there presented on the screen. I need this information to be hidden.

    So I instead tried to add another field to the TwpTextObj. It works great why the application is running as it maintains the information, however it does not save into the RFT. What functions would I need to alter to get the editor to read and write this extra field into the RTF data.

    Thank you.

    P.S. I would really like to solve this issues using the string field I added but if it is not possible then if there is a way to get the params property to not show that would suffice too.

    • Offizieller Beitrag

    Hi,

    Using the event OnTextObjGetTextEx You can control how the objects are painted. This make it possible to actually hide that text.

    The RTF writer writes for regular text objects this properties:
    Name
    Source
    Params

    Line 3290 in WPIOWriteRTF

    Saving other information in RTF compatible can be done similar to "Params" (see code)

    And loaded like this in WPIOReadRTF - look for idestFldParams.

    Julian