Hello Kambiz,
I ahve a problem with loading backgroundimages in nodes with png:
In SimpleGraph1ObjectInitInstance I do:
- Code: Select all
PNG := TPNGObject.Create;
TRY
PNG.LoadFromFile(pnodebackgroundfile);
TGraphNode(GraphObject).Background.BitMap.Assign(PNG); //Convert data into bitmap
FINALLY
PNG.Free;
End;
Backgroung show up and all looks fine with background-transparent.
When I save the sgp I get a quite huge filesize.
When reloading the sgp the transparence dissappear and background looks solid white.
When I use the nodeproperty dialog derived from the demo and reapply the background image, I get transparence again.
And when saving the file gets much more smaller than before. And it loads again with transparency.
In TNodeProperties.ApplyChanges the background is load with this:
- Code: Select all
if Backgnd = 1 then
Background.LoadFromFile(OpenPictureDialog.FileName)
But when I try this:
TGraphNode(GraphObject).Background.LoadFromFile(pnodebackgroundfile);
It does not load/show.
Note sure where my mystake is.
Regards
Hans-Peter