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.
Hide Rulers, Guides and Grid and measure setup of these
Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan
- 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
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.
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.
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.
Re: Hide Rulers, Guides and Grid and measure setup of these
Thanks a million Vasyl
Re: Hide Rulers, Guides and Grid and measure setup of these
One more thing:
What is the "name" of the property for "Subdivision for Grid" ?
What is the "name" of the property for "Subdivision for Grid" ?
- 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
ctrl.SetProperty("Measurement.Grid.CellDivs", divs, 0);
// 0-auto, depended with units, 10 for cm, 8 for inch, 6-for pt, etc
// 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.
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.
- 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
Kudos to Vasyl
Cheers,
Stefan
Cheers,
Stefan