I am trying to add a ruler to both x and y axes of a picturebox as in the example shown below. Is there a way for me to design a windows form application? I am lost and unfortunately I don't have any code to show you.
Asked
Active
Viewed 1,825 times
0
-
http://www.codeproject.com/Tips/676472/A-PictureBox-with-Zoom-Grid-and-Rulers – Nissim Jul 28 '15 at 14:52
-
You can add 2-3 Panels to the PictureBox that show a ruler grid. The more interesting part is the functions you want: It should go with the zoom, right? But if you also want scrolling you will need to change the plan a little and add them to the underlying scrolling panel. And you will want to set the units..Any other functions? In Photoshop you can pull lines from the rulers and you get feedback on the positions when moving over the rulers.. Best plan ahead! – TaW Jul 28 '15 at 15:35
-
See [here for a drawing example of a ruler](http://stackoverflow.com/questions/26804212/how-to-flip-alignment-of-drawn-content-in-a-panel/26805337?s=9|0.0721#26805337) which should get you started on how to __draw__ a `Panel` with a ruler grid.. – TaW Jul 29 '15 at 06:54
-
Thanks! That was really helpful – comsfollower Jul 29 '15 at 08:14
1 Answers
0
A guy created a custom control for a grid with with ruler. Here is his control on the codeproject: http://www.codeproject.com/Articles/4369/Ruler-Control

Gnqz
- 3,292
- 3
- 25
- 35
-
Thanks I already saw this codeproject, but I couldn't adapt it to the application that I'm trying to write. So I have to come up with something else – comsfollower Jul 28 '15 at 18:23