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, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

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 »

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: 2353
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 »

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 »

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 »

One more thing:

What is the "name" of the property for "Subdivision for Grid" ?
User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 2353
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 »

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 »

Tanks Vasyl :mrgreen:
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17906
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 »

Kudos to Vasyl :D

Cheers,
Stefan
Post Reply