The following Pane
object does not scroll when the mouse wheel is used. Does anyone experience the same behaviour? Is it the default behaviour? Any idea why? Could it be platform-specific?
CreateDialog[Pane[Column[Range[30]], {300, 200}, Scrollbars -> True]]
My platform: Win7-64, Mathematica 8.0.1
An alternative solution:
Needs["GUIKit`"]
ref = GUIRun[
Widget["Panel", {
Widget["ScrollPane", {
"viewportView" -> Widget["List", {
"visibleRowCount" -> 4,
"items" -> Script[Range[30]]
}] }] }]
];
The problem with Pane is that the MouseWheel
event is not bound, as it is in GUIKit. Using this technique you could also do Bind["MouseWheel" ...]
to any other action.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With