Skip to main content
deleted 1 characters in body
Source Link
Sjoerd C. de Vries
  • 66.2k
  • 15
  • 189
  • 327

WhatHow about a 'Next page' button that becomes active only if the user has seen or at least scrolled to a particular part of a page, a disclaimer for instance?


EDIT
As requested: this was what I had in mind

texts = ExampleData["Text"];
i = 1;
imax = texts // Length;
bottomSeen = False;
Panel[
 Column[
  {
   Button["Next page", If[i <= imax, i++, i = 1]; bottomSeen = False;,
     Enabled -> Dynamic[bottomSeen]],
   Dynamic[
    Pane[
     Column[
      {
       ExampleData[texts[[i]]],
       ,
       DynamicWrapper["SEEN THIS", bottomSeen = True]
       }],
     ImageSize -> {500, 150}, Scrollbars -> True, 
     ScrollPosition -> {1, 1}
     ]
    ]
   }
  ]
 ]

Mathematica graphics

There's one problem I didn't anticipate: a DynamicWrapper placed in a Pane is activated as soon as the Pane is visible even when the DynamicWrapper content is scrolled outside the visible window of the Pane. I haven't solved that yet.

What about a 'Next page' button that becomes active only if the user has seen or at least scrolled to a particular part of a page, a disclaimer for instance?


EDIT
As requested: this was what I had in mind

texts = ExampleData["Text"];
i = 1;
imax = texts // Length;
bottomSeen = False;
Panel[
 Column[
  {
   Button["Next page", If[i <= imax, i++, i = 1]; bottomSeen = False;,
     Enabled -> Dynamic[bottomSeen]],
   Dynamic[
    Pane[
     Column[
      {
       ExampleData[texts[[i]]],
       ,
       DynamicWrapper["SEEN THIS", bottomSeen = True]
       }],
     ImageSize -> {500, 150}, Scrollbars -> True, 
     ScrollPosition -> {1, 1}
     ]
    ]
   }
  ]
 ]

Mathematica graphics

There's one problem I didn't anticipate: a DynamicWrapper placed in a Pane is activated as soon as the Pane is visible even when the DynamicWrapper content is scrolled outside the visible window of the Pane. I haven't solved that yet.

How about a 'Next page' button that becomes active only if the user has seen or at least scrolled to a particular part of a page, a disclaimer for instance?


EDIT
As requested: this was what I had in mind

texts = ExampleData["Text"];
i = 1;
imax = texts // Length;
bottomSeen = False;
Panel[
 Column[
  {
   Button["Next page", If[i <= imax, i++, i = 1]; bottomSeen = False;,
     Enabled -> Dynamic[bottomSeen]],
   Dynamic[
    Pane[
     Column[
      {
       ExampleData[texts[[i]]],
       ,
       DynamicWrapper["SEEN THIS", bottomSeen = True]
       }],
     ImageSize -> {500, 150}, Scrollbars -> True, 
     ScrollPosition -> {1, 1}
     ]
    ]
   }
  ]
 ]

Mathematica graphics

There's one problem I didn't anticipate: a DynamicWrapper placed in a Pane is activated as soon as the Pane is visible even when the DynamicWrapper content is scrolled outside the visible window of the Pane. I haven't solved that yet.

added 954 characters in body
Source Link
Sjoerd C. de Vries
  • 66.2k
  • 15
  • 189
  • 327

What about a 'Next page' button that becomes active only if the user has seen or at least scrolled to a particular part of a page, a disclaimer for instance?


EDIT
As requested: this was what I had in mind

texts = ExampleData["Text"];
i = 1;
imax = texts // Length;
bottomSeen = False;
Panel[
 Column[
  {
   Button["Next page", If[i <= imax, i++, i = 1]; bottomSeen = False;,
     Enabled -> Dynamic[bottomSeen]],
   Dynamic[
    Pane[
     Column[
      {
       ExampleData[texts[[i]]],
       ,
       DynamicWrapper["SEEN THIS", bottomSeen = True]
       }],
     ImageSize -> {500, 150}, Scrollbars -> True, 
     ScrollPosition -> {1, 1}
     ]
    ]
   }
  ]
 ]

Mathematica graphics

There's one problem I didn't anticipate: a DynamicWrapper placed in a Pane is activated as soon as the Pane is visible even when the DynamicWrapper content is scrolled outside the visible window of the Pane. I haven't solved that yet.

What about a 'Next page' button that becomes active only if the user has seen or at least scrolled to a particular part of a page, a disclaimer for instance?

What about a 'Next page' button that becomes active only if the user has seen or at least scrolled to a particular part of a page, a disclaimer for instance?


EDIT
As requested: this was what I had in mind

texts = ExampleData["Text"];
i = 1;
imax = texts // Length;
bottomSeen = False;
Panel[
 Column[
  {
   Button["Next page", If[i <= imax, i++, i = 1]; bottomSeen = False;,
     Enabled -> Dynamic[bottomSeen]],
   Dynamic[
    Pane[
     Column[
      {
       ExampleData[texts[[i]]],
       ,
       DynamicWrapper["SEEN THIS", bottomSeen = True]
       }],
     ImageSize -> {500, 150}, Scrollbars -> True, 
     ScrollPosition -> {1, 1}
     ]
    ]
   }
  ]
 ]

Mathematica graphics

There's one problem I didn't anticipate: a DynamicWrapper placed in a Pane is activated as soon as the Pane is visible even when the DynamicWrapper content is scrolled outside the visible window of the Pane. I haven't solved that yet.

Source Link
Sjoerd C. de Vries
  • 66.2k
  • 15
  • 189
  • 327

What about a 'Next page' button that becomes active only if the user has seen or at least scrolled to a particular part of a page, a disclaimer for instance?