Index: uspace/app/uidemo/uidemo.c
===================================================================
--- uspace/app/uidemo/uidemo.c	(revision f2b9ecf8923bcc68cb55a04458d12125aeaed712)
+++ uspace/app/uidemo/uidemo.c	(revision d4ea1f67c45352df9a960c7a2a7b061780108b7c)
@@ -89,4 +89,6 @@
 static void scrollbar_up(ui_scrollbar_t *, void *);
 static void scrollbar_down(ui_scrollbar_t *, void *);
+static void scrollbar_page_up(ui_scrollbar_t *, void *);
+static void scrollbar_page_down(ui_scrollbar_t *, void *);
 static void scrollbar_moved(ui_scrollbar_t *, void *, gfx_coord_t);
 
@@ -94,4 +96,6 @@
 	.up = scrollbar_up,
 	.down = scrollbar_down,
+	.page_up = scrollbar_page_up,
+	.page_down = scrollbar_page_down,
 	.moved = scrollbar_moved
 };
@@ -232,9 +236,5 @@
 static void scrollbar_up(ui_scrollbar_t *scrollbar, void *arg)
 {
-	ui_demo_t *demo = (ui_demo_t *) arg;
 	gfx_coord_t pos;
-	char *str;
-	errno_t rc;
-	int rv;
 
 	pos = ui_scrollbar_get_pos(scrollbar);
@@ -242,18 +242,5 @@
 
 	pos = ui_scrollbar_get_pos(scrollbar);
-
-	rv = asprintf(&str, "Scrollbar: %d of %d", (int) pos,
-	    ui_scrollbar_move_length(scrollbar));
-	if (rv < 0) {
-		printf("Out of memory.\n");
-		return;
-	}
-
-	rc = ui_entry_set_text(demo->entry, str);
-	if (rc != EOK)
-		printf("Error changing entry text.\n");
-	(void) ui_entry_paint(demo->entry);
-
-	free(str);
+	scrollbar_moved(scrollbar, arg, pos);
 }
 
@@ -265,9 +252,5 @@
 static void scrollbar_down(ui_scrollbar_t *scrollbar, void *arg)
 {
-	ui_demo_t *demo = (ui_demo_t *) arg;
 	gfx_coord_t pos;
-	char *str;
-	errno_t rc;
-	int rv;
 
 	pos = ui_scrollbar_get_pos(scrollbar);
@@ -275,18 +258,39 @@
 
 	pos = ui_scrollbar_get_pos(scrollbar);
-
-	rv = asprintf(&str, "Scrollbar: %d of %d", (int) pos,
-	    ui_scrollbar_move_length(scrollbar));
-	if (rv < 0) {
-		printf("Out of memory.\n");
-		return;
-	}
-
-	rc = ui_entry_set_text(demo->entry, str);
-	if (rc != EOK)
-		printf("Error changing entry text.\n");
-	(void) ui_entry_paint(demo->entry);
-
-	free(str);
+	scrollbar_moved(scrollbar, arg, pos);
+}
+
+/** Scrollbar page up event.
+ *
+ * @param scrollbar Scrollbar
+ * @param arg Argument (demo)
+ */
+static void scrollbar_page_up(ui_scrollbar_t *scrollbar, void *arg)
+{
+	gfx_coord_t pos;
+
+	pos = ui_scrollbar_get_pos(scrollbar);
+	ui_scrollbar_set_pos(scrollbar, pos -
+	    ui_scrollbar_through_length(scrollbar) / 4);
+
+	pos = ui_scrollbar_get_pos(scrollbar);
+	scrollbar_moved(scrollbar, arg, pos);
+}
+
+/** Scrollbar page down event.
+ *
+ * @param scrollbar Scrollbar
+ * @param arg Argument (demo)
+ */
+static void scrollbar_page_down(ui_scrollbar_t *scrollbar, void *arg)
+{
+	gfx_coord_t pos;
+
+	pos = ui_scrollbar_get_pos(scrollbar);
+	ui_scrollbar_set_pos(scrollbar, pos +
+	    ui_scrollbar_through_length(scrollbar) / 4);
+
+	pos = ui_scrollbar_get_pos(scrollbar);
+	scrollbar_moved(scrollbar, arg, pos);
 }
 
