Board index » cppbuilder » Help, TBitmap property in Component -> saving

Help, TBitmap property in Component -> saving

Hi I am trying to use a TBitmap as a property in a component i'm writing,
this way the user can use the default click and load image from the object

All works well, except that the image they load never gets saved. When i say
never gets saved, its not there at runtime or if i close the project and
reload. I get an error something like TVolumebar->Bitmap error initialising,
incorrect init path (i cant remember the actual message).

How exactually do you go about making the object inspector (or what ever has
the job of it) save the image data etc like a normal int, Ansistrings etc

Thanks for any help you can provide.

Karl Bridger


Re:Help, TBitmap property in Component -> saving

Karl, I don't know specifically what the problem might be, but you might
try copying the object and pasting it into an editor so you can see
what's getting streamed for the object. I suspect that's where the
problem lies.

Your component may have to take some special steps with that particular
property to make sure it streams correctly.

I have some information on this subject at

which talks about creating a streamable aggregate component.

Note that a streamable aggregate can't participate properly in form
inheritance without some special steps that haven't yet made it into
that document.

Mark Cashman, creator of The Temp{*word*203}Doorway at
- Original digital art, writing, and more -
C++ Builder Tips and The C++ Builder Programmer's Webring (Join us!)

Other Threads