Hi - please advice me on the following. my ruler units is mm and my
GridCellSize= 50x50, how ca i bring the grid and ruler in sync.
Are you using GoView or GoDrawView?
i am using godraw
ok, something like this should work then:
[code]
goDrawView1.HorizontalRuler.Units = Northwoods.Go.Draw.GoDrawUnit.Millimeter;
goDrawView1.VerticalRuler.Units = Northwoods.Go.Draw.GoDrawUnit.Millimeter;
goDrawView1.VerticalRuler.Units = Northwoods.Go.Draw.GoDrawUnit.Millimeter;
float x = (float)GoDrawUnits.ConvertX(50, GoDrawUnit.Millimeter, GoDrawUnit.Pixel);
float y = (float)GoDrawUnits.ConvertY(50, GoDrawUnit.Millimeter, GoDrawUnit.Pixel);
this.goDrawView1.GridCellSize = new SizeF(x, y);
float y = (float)GoDrawUnits.ConvertY(50, GoDrawUnit.Millimeter, GoDrawUnit.Pixel);
this.goDrawView1.GridCellSize = new SizeF(x, y);
float xO = (float)GoDrawUnits.ConvertX(15, GoDrawUnit.Millimeter, GoDrawUnit.Pixel);
float yO = (float)GoDrawUnits.ConvertY(15, GoDrawUnit.Millimeter, GoDrawUnit.Pixel);
this.goDrawView1.GridOrigin = new PointF(xO, yO);
this.goDrawView1.SheetTopLeftMargin = new SizeF(xO, yO);
float yO = (float)GoDrawUnits.ConvertY(15, GoDrawUnit.Millimeter, GoDrawUnit.Pixel);
this.goDrawView1.GridOrigin = new PointF(xO, yO);
this.goDrawView1.SheetTopLeftMargin = new SizeF(xO, yO);
[/code]
thanks for the wonderfull resonse - works 100%