Hide Rulers, Guides and Grid and measure setup of these

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Sean - Tracker, Chris - Tracker Supp, Tracker Supp-Stefan, Ivan - Tracker Software

Post Reply
magthenop
User
Posts: 43
Joined: Tue Sep 07, 2010 8:35 am

Hide Rulers, Guides and Grid and measure setup of these

Post by magthenop » Mon Nov 22, 2010 7:30 am

Hi!
I have found how to show Rulers, Guides and Grid,
but I have not found out how to set the measurements of these and how to hide them.
I would like to programmaticaly set these to whatever I want.

Can someone please tell me how?
and if there is a good referense from Adobe that shows these kind of stuff I would like to have a link to that one also.

User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 1923
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: Hide Rulers, Guides and Grid and measure setup of these

Post by Vasyl-Tracker Dev Team » Mon Nov 22, 2010 10:29 am

Hi, magthenop.

You may use undocumented properties:

1. to change measurement units:
ctrl.SetProperty("Measurement.Units", shortUnitName, 0); // possible named values: "pt", "in", "cm", "mm", "p"
2. to setup grid:
ctrl.SetProperty("Measurement.Grid.Visible", visibleFlag, 0); // show/hide
ctrl.SetProperty("Measurement.Grid.LinesColor", rgbColor, 0);
ctrl.SetProperty("Measurement.Grid.LinesStyle", linesStyle, 0); // "Dashed", "Solid"
ctrl.SetProperty("Measurement.Grid.CellWidth", cw, 0); // in pt
ctrl.SetProperty("Measurement.Grid.CellHeight", ch, 0); // in pt
3. to setup guides:
ctrl.SetProperty("Measurement.Guides.Visible", visibleFlag, 0);
ctrl.SetProperty("Measurement.Guides.Color", rgb, 0);
ctrl.SetProperty("Measurement.Guides.Style", style, 0); // "Dashed", "Solid"
4. to setup rulers:
ctrl.SetProperty("Measurement.Rulers.Visible", visibleFlag, 0);
ctrl.SetProperty("Measurement.Rulers.TickDivs", tickDivs, 0); // count of sub-ticks in one interval, for example 10 for cm unit means one mark for each mm (sure, if page zoom is large enough).
ctrl.SetProperty("Measurement.Rulers.ShowFractions", showFrac, 0);

HTH.
Vasyl Yaremyn
Tracker Software Products
Project Developer

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.

magthenop
User
Posts: 43
Joined: Tue Sep 07, 2010 8:35 am

Re: Hide Rulers, Guides and Grid and measure setup of these

Post by magthenop » Mon Nov 22, 2010 10:55 am

Thanks a million Vasyl :mrgreen:

magthenop
User
Posts: 43
Joined: Tue Sep 07, 2010 8:35 am

Re: Hide Rulers, Guides and Grid and measure setup of these

Post by magthenop » Mon Nov 22, 2010 1:59 pm

One more thing:

What is the "name" of the property for "Subdivision for Grid" ?

User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 1923
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: Hide Rulers, Guides and Grid and measure setup of these

Post by Vasyl-Tracker Dev Team » Mon Nov 22, 2010 3:58 pm

ctrl.SetProperty("Measurement.Grid.CellDivs", divs, 0);
// 0-auto, depended with units, 10 for cm, 8 for inch, 6-for pt, etc
Vasyl Yaremyn
Tracker Software Products
Project Developer

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.

magthenop
User
Posts: 43
Joined: Tue Sep 07, 2010 8:35 am

Re: Hide Rulers, Guides and Grid and measure setup of these

Post by magthenop » Tue Nov 23, 2010 7:19 am

Tanks Vasyl :mrgreen:

User avatar
Tracker Supp-Stefan
Site Admin
Posts: 13413
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Hide Rulers, Guides and Grid and measure setup of these

Post by Tracker Supp-Stefan » Tue Nov 23, 2010 9:39 am

Kudos to Vasyl :D

Cheers,
Stefan

Post Reply