Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Display Document Limits (Read 2498 times)
rcruzmar
YaBB Newbies
*
Offline



Posts: 25
Location: FL
Joined: Sep 19th, 2007
Display Document Limits
Feb 26th, 2008 at 9:58pm
Print Post  
Hello,

I would like to know if there is a way to visually display the limits of the document area. For example, if I define an area equal to the Pixel, Point or Document dimentions of a standard page in either Portrait or Landscape mode using SetDocSize, MeasureUnit and RestrObjsToDoc, would it be possible to have the dimensions visually displayed on the FlowChart control?

Currently, I draw a box to those dimentions so the user knows the document drawing area. This box is then set to Locked Mode so it can't be accessed or deleted.

Thanks for your help.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Display Document Limits
Reply #1 - Feb 27th, 2008 at 5:56am
Print Post  
Hi,

You could enable ShowPageMarkers in PrintOptions and set PageMarkersFixedWidth and PageMarkersFixedHeight to be as big as the document.

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



Posts: 25
Location: FL
Joined: Sep 19th, 2007
Re: Display Document Limits
Reply #2 - Feb 27th, 2008 at 1:21pm
Print Post  
Hi Stoyo,

Thanks for the quick reply. Here is the code I am using to display the document borders:

Code
Select All
// Define document dimentions to be that of a TV screen...
long nW = (long)GetDocument()->GetDisplayWidth() * 100; // My width calculation
long nH = (long)GetDocument()->GetDisplayHeight() * 100; // My height calculation
m_FlowCtrl.SetDocSize(0, 0, nW, nH); // 600 X 400
m_FlowCtrl.GetPrintOptions().SetPageMarkersFixedHeight(nH);
m_FlowCtrl.GetPrintOptions().SetPageMarkersFixedWidth(nW);
m_FlowCtrl.GetPrintOptions().SetPageMarkersColor(RGB(255,0,0));
m_FlowCtrl.GetPrintOptions().SetPageMarkersWidth(2);
m_FlowCtrl.GetPrintOptions().SetShowPageMarkers(TRUE); 



What is displayed on screen is the upper left corner and two lines extending vertically and horizontally and nothing else. The right corner lines are not displayed.

In the meantime I will continue to work on this and see if I can figure out the problem.

Any thoughts?

Thanks for your help!!! Grin

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Display Document Limits
Reply #3 - Feb 27th, 2008 at 1:28pm
Print Post  
Hi,

It's a good start 8) Subtracting 1 from the document size worked fine for me:

fcx.PrintOptions.PageMarkersFixedWidth = fcx.DocRight - 1
fcx.PrintOptions.PageMarkersFixedHeight = fcx.DocBottom - 1

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



Posts: 25
Location: FL
Joined: Sep 19th, 2007
Re: Display Document Limits
Reply #4 - Feb 27th, 2008 at 5:51pm
Print Post  
Wished I'd think of that!!  Roll Eyes

Thanks for your help.

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