This forum is temporaily read-only. All existing discussions remain available for reference. For new questions, bug reports or support requests, please contact us at mail@lmdsupport.com.

When to use TLMDClassPropEditor::SetStrValue and when to use SetOrdValue

The example Picture property inspector editor calls SetOrdValue, I'm trying to create a RTFEditor that saves a string to the underlying visual object. Should I use SetStrValue or SetOrdValue?

Using SetStrValue I'm not seeing the result I would expect

Comments

  • That's depend of property type your editor is created for. If the property is of string type - then yes, you should call SetStrValue. You can send simple isolated demo project to our support e-mail, I'll look.
  • Thanks. It was actually a TStrings property I'm trying to edit and by looking at the source for your TLMDStringsPropEditor I could see what to do - namely use SetObjectValue:

    procedure TLMDStringsPropEditor.Edit;
    var
      LDlg: TLMDStringsEditorDialog;
    begin
      LDlg := TLMDStringsEditorDialog.Create(Application);
      try
        LDlg.Lines := TStrings(GetObjectValue(0));
        if LDlg.Execute then
          SetObjectValue(LDlg.Lines);
      finally
        LDlg.Free;
      end;
    end;

    Thanks

Sign In or Register to comment.