A GridView is a
Control
that acts like an interactive version of a scatterplot. It shows a rectangular
region of the cartesian plane, which can be panned or zoomed using the keyboard
or mouse. GridViews are often accompanied by
GridAxes.
Properties (Shift-Control-Click)
- Active
- XRange - visible x interval
- YRange - visible y interval
- XPoint - current mouse x location
- YPoint - current mouse y location
- Passive
- Foreground - color used to draw tick marks, numbers, and label
- Background - color used to fill the background
- Font - font used to draw numbers and label
- Units Format - the numeric format (such as
#0.00
) used to draw mouse tracking text.
Options (Control-Click)
- Tracking involves the current mouse location in the view. (The XPoint/YPoint properties must be bound to variables for tracking to have an effect.)
- Show lines draws vertical/horizontal lines through the current mouse x/y location.
- Show text prints the current mouse x/y location. in the lower left corner of view.
Mouse Interactions
The mouse can be used to pan and zoom the cartesian region shown in the view.
To zoom instead of pan, press Shift while dragging.
- Drag Left: Pan/zoom lower/in on x
- Drag Right: Pan/zoom higher/out on x
- Drag Up: Pan/zoom lower/in on y
- Drag Down: Pan/zoom higher/out on y
Diagonal drags work in the expected way.
Keyboard Interactions
The keyboard can be used to pan and zoom the cartesian region shown in the view.
To zoom instead of pan, press Shift with the desired key. For pans, a
block is 100% of the width/height of the view, and a unit is 10% of the
width/height of the view. For zooms, a block is x2, and a unit is x1.1.
- Left: Pan/zoom one block lower/in on x
- Right: Pan/zoom one block higher/out on x
- Up: Pan/zoom one block lower/in on y
- Down: Pan/zoom one block higher/out on y
- Numpad4: Pan/zoom one unit lower/in on x
- Numpad6: Pan/zoom one unit higher/out on x
- Numpad2: Pan/zoom one unit lower/in on y
- Numpad8: Pan/zoom one unit higher/out on y
- Home, Numpad5: Center on zero
The other number keys on the numeric keypad pan/zoom diexpected.