Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Fitting all chart objects in a finite space (Read 2352 times)
jmcnair
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 5
Joined: Apr 23rd, 2008
Fitting all chart objects in a finite space
Apr 23rd, 2008 at 5:14am
Print Post  
Hi.  I've got a diagram of a hierarchical set of nodes that I'm drawing out to an image and laying out using a TreeLayout.  I would like to be able to set the FlowChart.DocExtents to a certain size, and then call Flowchart.ZoomToFit and have all of my drawn diagram show up as large as possible within the boundaries that I defined for the image size.  It seems like it should be an easy thing to do, given the DocExtents property, and the ZoomToFit method, possibly along with the AutoSizeDoc property.  For some reason, though, I can't seem to get it right.  My diagram is either tiny, too large for the defined document area, only partially drawn and cut off, or some other malfunctional results from the permutations I tried.  I must not understand these properties and methods very well, or maybe I'm just calling them out of sequence or some such.

Can anyone give me some advice on how to accomplish my goal?

-Jason
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Fitting all chart objects in a finite space
Reply #1 - Apr 23rd, 2008 at 1:26pm
Print Post  
Seems we haven't implemented ZoomToFit, because we could not find a way to find out the size of the control's visible area when shown in a browser. If you know how big the visible area will be (in pixels), you might decrease the ZoomFactor in a loop until DocToClient(DocExtents) becomes smaller than that size.

Stoyan
  
Back to top
 
IP Logged
 
jmcnair
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 5
Joined: Apr 23rd, 2008
Re: Fitting all chart objects in a finite space
Reply #2 - Apr 24th, 2008 at 12:15am
Print Post  
Thanks for the quick reply!  I haven't had a chance to try it out yet, but it sounds reasonable.  I'll certainly give it a try.

  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint