<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Il 22/04/2018 13:22, Michael Van Canneyt via Lazarus ha scritto:<br>
    </p>
    <blockquote type="cite"
      cite="mid:alpine.DEB.2.20.1804221321180.26933@home.telenet.be">This
      is how all properties that are  TPersistent descendents work, so
      this
      <br>
      behaviour should not come as a surprise.
    </blockquote>
    <br>
    I wouldn't say so.<br>
    <br>
    E.g. TCanvas is a TPersistent descendent, but the Canvas property of
    a TCustomControl is declared like that:<br>
    <blockquote type="cite">
      <pre>    property Canvas: TCanvas read FCanvas write FCanvas; </pre>
    </blockquote>
    This means that after a <br>
    <pre>SomeControl.Canvas := MyCanvas;</pre>
    or<br>
    <pre>MyCanvas := SomeControl.Canvas;</pre>
    SomeControl.Canvas and MyCanvas will be the same object. Only a
    pointer is copied.<br>
    <br>
    On the contrary, the property Bitmap of a TPicture is declare like
    that:<br>
    <br>
    <blockquote type="cite">
      <pre>    property Bitmap: TBitmap read GetBitmap write SetBitmap;</pre>
    </blockquote>
    <br>
    where GetBitmap actually returns the TPicture.Bitmap Object, while
    SetBitmap creates a different Bitmap Object, and assigns it the
    content of the supplied bitmap (see TPicture.SetGraphic, called by
    TPicture.SetBitmap).<br>
    <br>
    This means that after a<br>
    <pre>MyBitmap := SomePicture.Bitmap;</pre>
    MyBitmap and SomePicture.Bitmap will represent the same Object,
    while after a<br>
    <pre>SomePicture.Bitmap := MyBitmap;</pre>
    MyBitmap and SomePicture.Bitmap will represent different Objects.<br>
    <br>
    This is IMHO a TPicture specific inconsistency. <br>
    <br>
    Giuliano<br>
    <br>
  </body>
</html>