Introduction – Getting started with Gtk_Scrollinglabel?


  • Scott Mattocks


Gtk_ScrollingLabel is a class that creates a pseudo-widget which makes scrolling text within a label easy. The text within the label can be set to scroll from left to right, right to left, or bounce within the boundries of the label. The speed of the scrolling text can also be controlled. There are also built in methods to make the text pause or stop when the user moves the mouse over the label and start up again when the mouse leaves the label space.

Getting started with Gtk_ScrollingLabel is easy. All you need to do is instantiate the class, add it to a window, and start the scrolling. Take at look at the example below.

Simple Setup

// Create a Gtk_ScrollingLabel instance.
require_once 'Gtk/ScrollingLabel.php';
$sLabel =& new Gtk_ScrollingLabel('Scrolling Labels Rule!');

// Create a GtkWindow to put the label in.
$gWin =& new GtkWindow;
$gWin->connect_object('destroy', array('gtk''main_quit'));

// Show everything.

// Start the label and the main loop.
Gtk_ScrollingLabel (Previous) Returns the full text of the label. (Next)
Last updated: Sat, 16 Feb 2019 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report.
View this page in:
  • English

User Notes:

There are no user contributed notes for this page.