Page 9 of 9

Re: TSimpleGraph Issues (and wish list)

PostPosted: January 22nd, 2015, 12:54 pm
by balsoft
hi
how can i use this component XE7 please help

Re: TSimpleGraph Issues (and wish list)

PostPosted: August 23rd, 2017, 6:20 pm
by IV13
Hello,

I'm having some troubles with creating a link in the code.

I want to creat a single line crossing the form (horizontal), but i want to create it on the code, and set a position that cannot be change.

I would appreciatte some help.

Re: TSimpleGraph Issues (and wish list)

PostPosted: July 12th, 2018, 7:58 pm
by HPW
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

Re: TSimpleGraph Issues (and wish list)

PostPosted: July 15th, 2018, 8:49 am
by Kambiz
Hi,

I am not sure but I guess because you assign the PNG image to the background as a bitmap, later the background saves the image as a bitmap too.
Did you try to assign the image directly to the background?

Re: TSimpleGraph Issues (and wish list)

PostPosted: July 18th, 2018, 7:29 pm
by HPW
Hello,

Yes, I tried it to assign it directly but then it did not Show.
Mabe I made different mistake somehow.

Regards