Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Box Picture (Read 3308 times)
gmhmg
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 5
Joined: Jan 26th, 2006
Box Picture
Jan 26th, 2006 at 9:58am
Print Post  
I'm using PHP and FlowChart with javascript
I need to load images into boxes but i dont know how to do it.

I'm trying:
Box.LoadPicture(filename)
but it dont do anything

How can do it?

thanks
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Box Picture
Reply #1 - Jan 26th, 2006 at 10:26am
Print Post  
Hi,

Do you call LoadPicture on the client side ? The method cannot load an image from a remote server, but only from the local file system. If you need to use some images from a server, try storing them in a diagram and load that diagram in a hidden flowchart instance. Then assign the images from the hidden flowchart to the boxes in the visible one, e.g.

fc.Boxes(0).Picture = fcImages.Boxes(imgIndex).Picture

I hope that helps
Stoyan
  
Back to top
 
IP Logged
 
gmhmg
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 5
Joined: Jan 26th, 2006
Re: Box Picture
Reply #2 - Jan 26th, 2006 at 11:31am
Print Post  
Sorry, i dont know how to do it
Im trying to create a diagram with the image
aux = fc.CreateBox(100 ,100,50,70);
aux.LoadPicture("D:\prueba.gif");
this works

Then i want to save to file:
fc.SaveToFile("fich",false);
but this fails
why this fails?


Then ill have to make a hidden diagram loading it from the file that i create (fc.LoadFromFile(fich))

And then make:
myfc.Boxes(0).Picture = fc.Boxes(imgIndex).Picture


is this correct?


thanks for your help
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Box Picture
Reply #3 - Jan 26th, 2006 at 12:22pm
Print Post  
This might fail if you run that code in IE, because FlowChartX runs in "safe for scripting" security mode then and does not allow creating files on the local file system. Otherwise the control could be used to overwrite arbitrary files on users PCs. Use SaveToString and LoadFromString instead of SaveToFile and LoadFromFile to create and load the diagram that contains the images.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint