Добро пожаловать на форум PHP программистов!
За последние 24 часа нас посетили 17244 программиста и 1834 робота. Сейчас ищут 1692 программиста ...

Introduction

Вернуться к: Gtk2_ScrollingLabel

Introduction

Introduction – Getting started with Gtk2_Scrollinglabel

Gtk2_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 Gtk2_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

<?php
// Create a Gtk2_ScrollingLabel instance.
require_once 'Gtk2/ScrollingLabel.php';
$sLabel = new Gtk2_ScrollingLabel('Scrolling Labels Rule!');

// Create a GtkWindow to put the label in.
$gWin = new GtkWindow;
$gWin->connect_simple('destroy', array('Gtk''main_quit'));
$gWin->add($sLabel->getWidget());

// Show everything.
$gwin->show_all();

// Start the label and the main loop.
$sLabel->startScroll();
gtk::main();
?>



Вернуться к: Gtk2_ScrollingLabel

© 2024 «PHP.RU — Сообщество PHP-Программистов»
Главная | Форум | Реклама на сайте | Контакты VIP Сувениры
Разработка компании ODware